|
Posted by Krustov on 12/02/07 11:29
$handle = fopen("http://www.radios.pt/portalradio/", "rb");
$contents = '';
while (!feof($handle))
{$contents .= fread($handle, 8192);}
fclose($handle);
$filename="content.txt"; $fp=fopen($filename,"w"); fwrite ($fp,
$contents); fclose($fp);
I havent tried the above - its just a code snippet i have .
<comp.lang.php>
<zenner>
<Fri, 30 Nov 2007 03:01:58 -0800 (PST)>
<bcbe4d48-09b2-406f-949b-5f7f7aa9ba52@y5g2000hsf.googlegroups.com>
> Below is an example of a site that gives an error when you try to read
> it.
>
> <?php
> $file="http://www.radios.pt/portalradio/";
> $fp = fopen($file, "r");
> while (!feof($fp))
> {
> $a=$a.fgets($fp);
> }
> fclose($fp);
> echo $a;
> ?>
>
Navigation:
[Reply to this message]
|