Re: fopen problem, 5 line script
| From: | Mag | Date: | Wed, 15 Sep 2004 17:13:33 +0000 |
| Subject: | Re: fopen problem, 5 line script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196758@lists.php.net to get a copy of this message | ||
--- Curt Zirzow <php-general@zirzow.dyndns.org> wrote:
> * Thus wrote Mag:
> > Hi,
> > Can someone tell me what I am doing wrong here
> please?
> >
> > <?php
> > $fileptr =
> > fopen(">l¯hDÜük2ú�|
> > <“http://www.google.com/index.html","r");
> >
> > $contents = fread($fileptr, filesize($fileptr));
> >...
> >
> > This is the error I get:
> > Warning: filesize(): Stat failed for Resource id
> #1
> > (errno=2 - No such file or directory) in
> > /home/quickxxx/public_html/tpg/ check- remote.php
> on
> > line 4
> >
> > Warning: fread(): Length parameter must be greater
> > than 0. in /
> > home/quickxxx/public_html/tpg/check-remote.php on
> line
>
> filesize() relies on the fact that the file you
> opened has support
> for stat(). the http wrapper does not have such a
> thing.
>
> see:
> http://php.net/filesize
> http://php.net/wrappers.http
>
>
Thanks for your replies guys but you have left me even
more confused...can someone correct my 5 line script
and tell me what was wrong THEN give me the php.net
manual urls? like this am just getting more
confused...
Thanks,
Mag
=====
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail