Downloading webpages

From: Date: Tue, 12 Oct 2004 22:44:43 +0000
Subject: Downloading webpages
Groups: php.windows 
Request: Send a blank email to php-windows+get-24738@lists.php.net to get a copy of this message
I'm attempting to download a webpage (http://finance.yahoo.com/q?s=erts), using the following code $fp=fopen($quote_url,'rb'); $contents=fread($fp,500000); fclose($fp); but it only downloads part of the webpage (1460 bytes to be exact). Putting the fread inside a while loop and reading until 0 bytes read eventually gets the entire page. Anyone know the reason for this, and how to fix it?

« previous php.windows (#24738) next »