Re: Accessing a website from within a php script
| From: | Richard Davey | Date: | Tue, 13 Jan 2004 10:11:59 +0000 |
| Subject: | Re: Accessing a website from within a php script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174419@lists.php.net to get a copy of this message | ||
Hello Børge,
Tuesday, January 13, 2004, 10:05:10 AM, you wrote:
BS> My php program uses sends send some information to a .cgi file
BS> possibly on a different site. That file uses GET to fetch the
BS> information and prints it out as it would if accessed through a
BS> browser. But instead I want my php program to intercept this and parse
BS> what the .cgi file sent out. How can I do this?
There are numerous ways to do this, but I'd probably just use
something as simple (and reliable) as fopen() using the URL with
embedded values as the parameter.
$fp = fopen("http://www.yourcgiscript.com?a=1&b=2&c=3/",
"r");
--
Best regards,
Richard mailto:rich@launchcode.co.uk