|
Posted by d on 10/01/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]
|