Re: Get Parameters in Includes?
| From: | mike | Date: | Thu, 10 Jan 2008 03:47:52 +0000 |
| Subject: | Re: Get Parameters in Includes? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267006@lists.php.net to get a copy of this message | ||
On 1/9/08, Liam <dawmail333@gmail.com> wrote:
> The cgi script IS perl. Oh, RE: the sentence below it: I'm running
> apache, and it DOESN'T work. The reason I am trying to call it in php
> is to include it on a webpage. So, tell me, how am I supposed to
> pre-generate the contents in a flatfile (whatever that is)? Or if I
> can't do that, then what I am supposed to do?
1) lynx -dump http://blah.com/x.cgi?getssi >file.htm
every so often,
or some other method to request the cgi and dump the output
2) include("http://blah.com/x.cgi?getssi") requires fopen
wrappers on
includes and is a poor security measure (would not really recommend
this)
3) use curl functions to grab it in PHP and display (still will
technically issue an HTTP request) - probably the best method, if you
have to.
CGI scripts are not designed to be executed on the command line using
parameters like GET. which is why it's poorly supported. i do have it
working under zeus and i have had it working in the past under apache,
but it might have been due to a specific configuration method (it also
was not CGI, but an SSI call to a php script with GET parameters...
same idea, but different SAPI, which could be why it doesn't work for
you anyway)