|
Posted by * Tong * on 10/29/06 15:36
On Sat, 28 Oct 2006 22:12:45 -0700, petersprc wrote:
> You could fetch a remote URL using PHP's URL wrappers. For example,
> readfile can stream the contents of a remote URL:
>
> readfile('http://site/content/page.html');
>
> You could also do this with mod_proxy...
>
> Since many browsers can automatically decompress gzip-compressed
> content, you wouldn't need to worry about decompressing it yourself.
First of all, thanks a lot for this comprehensive reply. You've even
covered issues that I hadn't thought about. thanks!
Just for the archive, following your advice, and scripts found in
http://ca.php.net/readfile
I hacked the following php script, which tested ok:
<?php
header("Content-Type: text/html");
header("Content-Encoding: x-gzip");
set_time_limit(0);
ob_start();
readfile('http://rute.2038bug.com/index.html.gz');
// use @ to hide 'nothing to flush' errors
@ob_flush();
$content = ob_get_contents();
ob_end_clean();
?>
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/
--
Posted via a free Usenet account from http://www.teranews.com
[Back to original message]
|