Re: Accessing a website from within a php script
| From: | Burhan Khalid | Date: | Tue, 13 Jan 2004 10:10:02 +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-174418@lists.php.net to get a copy of this message | ||
Børge Strand wrote:
Hi, In my php code, how can I fetch the input from another website and parse its output without sending it to the client? What I want to do is this: My php program uses sends send some information to a .cgi file possibly on a different site. That file uses GET to fetch the information and prints it out as it would if accessed through a browser. But instead I want my php program to intercept this and parse what the .cgi file sent out. How can I do this?From http://www.php.net/manual/en/function.file-get-contents.php "file_get_contents -- Reads entire file into a string" "Tip: You can use a URL as a filename with this function if the fopen wrappers have been enabled. See fopen() for more details on how to specify the filename and Appendix I for a list of supported URL protocols." The same applies to file() and fopen() -- Burhan