Re: problem with fread

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: problem with fread
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-96389@lists.php.net to get a copy of this message
> erm, don't wanna be nosy, but you meant fgets() - forgot the "s" - > didn't you? Yes I did (early-morning-itis I guess heh). Thanks for the typo correction ;) Ammended code is as follows: >> <?php >> $output = ""; // Clear output >> $url = "http://whatever.com/file.html"; // >> whatever you wanna pull >> from >> >> if ($fp = fopen($url, "r")) { >> while ($tmp = fgets($fp, 4096)) $output .= $tmp; >> fclose($fp); >> } >> >> echo "The URL's content is: ".$output; >> ?> -- Dan Hardiker [dhardiker@staff.firstcreative.net] ADAM Software & Systems Engineer First Creative Ltd

« previous php.general (#96389) next »