You are here: Re: Retrieve and display 3rd party pages « PHP Programming Language « IT news, forums, messages
Re: Retrieve and display 3rd party pages

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация