abdfahim Posted May 3, 2010 Share Posted May 3, 2010 Hi Guys, I want to read a text file that resides in a remote http server. Is it possible? Thanks, Quote Link to comment Share on other sites More sharing options...
JAY6390 Posted May 3, 2010 Share Posted May 3, 2010 If the file is accessible via browser then yes simply use file_get_contents() If it's only accessible via ftp then you will have to use php's ftp functions to do so http://www.php.net/ftp Quote Link to comment Share on other sites More sharing options...
abdfahim Posted May 3, 2010 Author Share Posted May 3, 2010 thanks v much, that's a gr8 help Quote Link to comment Share on other sites More sharing options...
abdfahim Posted May 5, 2010 Author Share Posted May 5, 2010 guys, i have successfully read one text file (resided in HTTP) using file_get_contents(). But surprisingly, it the code works at night, but fail to read file during day time, though link address is same and accessible from any browser all the time. Is there any possibility that the remote server block that command during day to reduce server load or something? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.