Open it using the fopen command - but do it as an HTTP open to the same server your PHP is on.
Then you can pass the get string along with the open request ... the Apache system (or whatever your using) should then execute the CGI with the get ... and you get read the results using fpassthru or fread. We use this technique to generate a kind of 3 teir business application model - where we use the PHP to open HTTP connections to JSP on another server to get them to do the bulk of the work. Works quite nicely (providing you don't have to battle with over-zealous network routers that cut you off after a 5 minute connection) - but that's my problem and we're dealing with it. Make any sense? Michael. -----Original Message----- From: Brennan Mann [mailto:brennan@;hire-experience.com] Sent: 15 November 2002 15:58 To: [EMAIL PROTECTED] Subject: [PHP-WIN] Re: Calling exe/cgi I am sorry. I forgot to add that the CGI uses the get method to receive data. For example "my_cgi.exe?=1000" The system("my_cgi.exe") call worked. But I still need to pass data to the exe. Any suggestions? Thanks again! Brennan "Brennan Mann" <[EMAIL PROTECTED]> wrote in message news:20021115145428.12116.qmail@;pb1.pair.com... > Hello everybody! > > I am new to PHP. I have several C and C++ programs that run as cgi(s). > Currently, I am just using a form on a web page to call the cgi(s). I am > running PHP on a Windows 2000 server with IIS. Can you call/invoke an exe > program from a PHP script? If so, could you please show an example. > > Thanks for your help! > Brennan > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _____________________________________________________________________ This message has been checked for all known viruses by the MessageLabs Virus Control Centre. This message has been checked for all known viruses by the MessageLabs Virus Control Centre. ********************************************************************* Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY ********************************************************************* -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php