Click to See Complete Forum and Search --> : Execute a CGI script through PHP
JamesNZ
Dec 12th, 2003, 03:47 PM
How can I execute a CGI script through PHP? PHP doesn't like this at all:
<!--#exec cgi="/cgi-bin/poll/fantasycricket.pl" -->
mendhak
Dec 12th, 2003, 10:59 PM
<?php include "/cgi-bin/poll/fantasycricket.pl" ?>
or
<?php virtual("/cgi-bin/poll/fantasycricket.pl" ?>
HTH
kows
Dec 12th, 2003, 11:28 PM
PHP doesn't like that because that's SSI.. I don't really know why; but I laughed when I read it..
The Hobo
Dec 13th, 2003, 03:32 PM
I laugh when I read every post. Bwah-ha-ha!
mendhak
Dec 15th, 2003, 02:57 AM
The PHP in my post is missing the ) and the ;
That makes it twice as funny.
CornedBee
Dec 17th, 2003, 04:08 PM
include does a raw text include, so that won't work.
You could use fopen to send a HTTP request to the CGI script and simply write out the results.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.