Can I call C program in PHP?

Discussion in 'PHP' started by ngkary, Aug 7, 2006.

  1. #1
    Hey guys, c if u could be helped.

    I am doing a web site program and what I need is to call a C program in the PHP could.

    Do u think it would be possible? The web site would get the user input from PHP UI and pass to the C program , the C program would process the function with the user input and output the a PHP page.

    Please HELP!!!

    Thx a lot!!

    Kary
     
    ngkary, Aug 7, 2006 IP
  2. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Assuming your C app uses standard input and output, and assuming your host allows it, you should be able to use the 'exec' group of functions: http://php.net/exec
     
    TwistMyArm, Aug 7, 2006 IP