filesize() not reading http pages

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric Layman

    filesize() not reading http pages

    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:



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

    It returned me this error:

    Warning: filesize() [function.filesi ze]: 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 **
    ----------------------------------------------------------
    Best Usenet Service Providers 2025 ranked by Newsgroup Access Newsservers, Usenet Search, Features & Free Trial. Add VPN for privacy.

  • Michael Fesser

    #2
    Re: filesize() not reading http pages

    ..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.



    Micha

    Comment

    • P Pulkkinen

      #3
      Re: filesize() not reading http pages


      "Eric Layman" <erricson@laysk irjoitti
      viestissä:11703 18072_3937@sp6i ad.superfeed.ne t...
      >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:

      But I have tried the following:
      echo filesize("http://www.yahoo.com/");
      Are you serious? Think again.


      Comment

      Working...