PHP using a c++ compiled program

hi all.

I have a problem.

I have a program (c++ program compiled to a exe file). I need to use a php interface to that program. The program needs data from the php interface. How do a start the program from php and key in the variables to the program!?

best regards

Comments

  • : hi all.
    :
    : I have a problem.
    :
    : I have a program (c++ program compiled to a exe file). I need to use a php interface to that program. The program needs data from the php interface. How do a start the program from php and key in the variables to the program!?
    :
    : best regards
    :

    mustamus!

    like c/c++ php supports the functions :

    exec();
    system();
    also php has function:
    passthru();
    and i think passthru is what you need since you want interaction between the php and c/c++.
    most of the times its data from c/c++ program that passes to php , but in your case since you have it in opposite direction you might want to use passthru(); function and use command argc,argv for data to be pass to your c/c++ program...

    hope this will give you an idea...


    weapon__x


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion