Reply to Re: Read a website with Fopen()

Your name:

Reply:


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;
> ?>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация