Re: How to access remote files with php?

From: Date: Wed, 19 Jan 2005 14:28:59 +0000
Subject: Re: How to access remote files with php?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-206747@lists.php.net to get a copy of this message
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

« previous php.general (#206747) next »