php-general | 2001062
Date: 06/24/01
- Next message: Jason Lustig: "[PHP] Connecting to a remote MSSQL database via ODBC and setting up the MSSQL extension"
- Previous message: Adam Huffman: "Re: [PHP] converting Word documents to something sensible"
- In reply to: Joris Van Droogenbroeck: "[PHP] readfile + proxy"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jason Lustig: "[PHP] Connecting to a remote MSSQL database via ODBC and setting up the MSSQL extension"
- Previous message: Adam Huffman: "Re: [PHP] converting Word documents to something sensible"
- In reply to: Joris Van Droogenbroeck: "[PHP] readfile + proxy"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

