You are here: Re: extract website into string « PHP Programming Language « IT news, forums, messages
Re: extract website into string

Posted by d on 09/29/40 11:37

"Al" <alexrussell101@gmail.com> wrote in message
news:1137561283.796882.41560@z14g2000cwz.googlegroups.com...
> As far as I know there is no limit... except probably in the gigabyte
> range, or whatever memory your server/php has available to it
> obviously.
>
> As for getting the html into a string, there are two main ways: using
> the native fopen() etc. commands from php and using an extension
> library such as cURL.

You can also use fsockopen(), too:

$host="google.com";
$buffer="";
$fp=fsockopen($host, 80);
fwrite($fp, "GET / HTTP/1.0\r\nHost: $host\r\n\r\n");
while (!feof($fp)) $buffer.=fread($fp, 4096);
fclose($fp);

that doesn't need any special flags set, or external modules.

 

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

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