Re: Opening URLs
| From: | CPT John W. Holmes | Date: | Tue, 22 Apr 2003 14:01:51 +0000 |
| Subject: | Re: Opening URLs | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144819@lists.php.net to get a copy of this message | ||
> > Works for me just fine... How do you know it "doesn't" work?
>
> ------------
>
> $filedata=fopen("http://www.google.com/search?q=pantera","r");
> while ($line=fgets($filedata,1000))
> {
> $googleHTML.=$line;
> }
> fclose ($filedata);
> ------------
>
> $googleHTML is empty when the URL above is used. When the URL is just
plain
> old Google, all of the HTML is received.
Again, that exact code works here. If you use fread() instead of fgets(),
does it change anything?
---John Holmes...