Re: readfile + proxy
| From: | Anon Y Mous | Date: | Sun, 24 Jun 2001 22:56:45 +0000 |
| Subject: | Re: readfile + proxy | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-55058@lists.php.net to get a copy of this message | ||
Instead of using readfile(), try using the file() function.
// Get php.net and store it in an array.
$theFile = file("http://www.php.net");
// Convert the array to one long string.
$theFile = implode("",$theFile);
// And output the file.
echo $theFile;
If you're trying to do this with an image, you need to use the
Header() function.
JVD> How can I read some webpage through a proxy in PHP.
JVD> I wan't to use the function readfile(http://www.php.net/) but I get an
JVD> host_connect error.
JVD> --
JVD> A good programmer is someone who looks both ways before crossing a one-way
JVD> street. - Doug Linder