Read a website with Fopen()
- From: zenner <pro.radio@xxxxxxxxxxx>
- Date: Fri, 30 Nov 2007 03:01:58 -0800 (PST)
Hello.
when i try to "read" some websites with fopen() some of them allow but
some don't
Does the server knows that it´s not a web browser that it's trying to
access?
How can i solve this??
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;
?>
.
- Follow-Ups:
- Re: Read a website with Fopen()
- From: Jonas Werres
- Re: Read a website with Fopen()
- From: taps128
- Re: Read a website with Fopen()
- From: Jerry Stuckle
- Re: Read a website with Fopen()
- From: petersprc
- Re: Read a website with Fopen()
- Prev by Date: Re: &$ in functions
- Next by Date: Re: Namaspaces, caling functions and classes defined in the global name space
- Previous by thread: &$ in functions
- Next by thread: Re: Read a website with Fopen()
- Index(es):
Relevant Pages
|