Posted by Jason Barnett on 01/19/05 16:28
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
Navigation:
[Reply to this message]
|