Hi all,
I'm using the code below to open webpages and read them into a variable.
I got the example from the manual but am confused as to how to limit how
much of the page to read.
Ideally, I just want to read the first 30k of each webpage. Could
somebody please show me how?
[EMAIL PROTECTED]($pagebeingcrawled,"rb");
$contents = "";
do {
$data = @fread($pagehandle, 8192);
if (strlen($data) == 0) {
break;
}
$contents.=$data;
while(true);
@fclose($pagehandle);
Many thanks!
--
Nick W
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php