By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,746 Members | 1,849 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,746 IT Pros & Developers. It's quick & easy.

filesize() not reading http pages

P: n/a
I have checked this setting in my php.ini

allow_url_fopen = On

It is ON be default.

According to the PHP documentation:

it stated that as of php5, filesize supports the reading of remote html
files:

http://php.net/manual/en/function.filesize.php

But I have tried the following:
echo filesize("http://www.yahoo.com/");

It returned me this error:

Warning: filesize() [function.filesize]: stat failed for..blah blah

Anyone have this same problem?

Yes. Im using PHP5 and php.ini's allow_url_fopen = On (Thanks to J.O. Aho)

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Feb 1 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
..oO(Eric Layman)
>According to the PHP documentation:

it stated that as of php5, filesize supports the reading of remote html
files:

http://php.net/manual/en/function.filesize.php
| As of PHP 5.0.0 this function can also be used with some URL wrappers.

Notice the word "some".

The HTTP wrapper doesn't support stat() functionality.

http://www.php.net/manual/en/wrappers.http.php

Micha
Feb 1 '07 #2

P: n/a

"Eric Layman" <erricson@layskirjoitti
viestissä:11*************@sp6iad.superfeed.net...
>I have checked this setting in my php.ini
allow_url_fopen = On
It is ON be default.
According to the PHP documentation:
it stated that as of php5, filesize supports the reading of remote html
files:
http://php.net/manual/en/function.filesize.php
But I have tried the following:
echo filesize("http://www.yahoo.com/");
Are you serious? Think again.
Feb 1 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.