Including remote CGI in Script

From: Date: Thu, 26 Oct 2000 17:49:24 +0000
Subject: Including remote CGI in Script
Groups: php.general 
Request: Send a blank email to php-general+get-22180@lists.php.net to get a copy of this message
Hi all, I am in the middle of writing a script that pulls data from MySQL and outputs in a tabular form, and calls an external Perl CGI to draw a dynamic graph using GD. Everything works a treat apart from calling the CGI. All the CGI does is output an image tag in HTML (in essence). I can call this by using; include "http://www.mydomain.com/cgi- bin/graphgen.cgi?ref=111123123&data=10,20,30,40,50&product=ProductA,Produ ctB,ProductC,ProductD,ProductE"; with no problems, however all three CGI params are dynalicallygenerated so I want to pass variables, I have tried include ("http://www.mydomain.com/cgi- bin/graphgen.cgi?ref=".$ref."&data=".$data."&product=".$product."); and even; include ($include); where $include is simply the full string pre-put together, but to no avail, I either get cannot include, or the CGI fails at the first instance of trying to process the CSV data, the CGI is fine, it appears to be the PHP calling it, and again only when dynamically constructing the call. Any ideas? I've also tried exec and virtual to an extent but to no avail, surely this can be done?

« previous php.general (#22180) next »