Re: How to access remote files with php?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sephiroth wrote:
Hi all,

How to access remote files with php?
For ex:
$sFile = "http://www.php.net/123.txt";;
if (file_exists($sFile)) {
  $hFile = fopen($sFile);
  ...
  fclose($hFile);
}


Regards, Sephiroth

You can use the file functions with URLs so long as you have allow_url_fopen set to TRUE in your php.ini.


--
Teach a person to fish...

Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://www.php.net/manual/en/index.php
php-general archives: http://marc.theaimsgroup.com/?l=php-general&w=2

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux