> 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:
>> > $output = ""; // Clear output
>> $url = "http://whatever.com/file.html";; // whatever you wanna
>$output = ""; // Clear output
> $url = "http://whatever.com/file.html";; // whatever you wanna pull from
>
> if ($fp = fopen($url, "r")) {
> while ($tmp = fget($fp, 4096)) $output .= $tmp;
> fclose($fp);
> }
>
> echo "The URL's content is: ".$output;
> ?>
erm, don't wanna b
> i have a question about the fread() function.
> i want to read data from a webserver url, which i don't know the exact
> size of, i only know that it varies.
You dont actually give the size of the file, you give the size of the block
you want to pull. For example:
http://whatever.com/file.html
3 matches
Mail list logo