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, Link to comment https://forums.phpfreaks.com/topic/200580-read-text-file-from-remote-server/ 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 Link to comment https://forums.phpfreaks.com/topic/200580-read-text-file-from-remote-server/#findComment-1052532 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 Link to comment https://forums.phpfreaks.com/topic/200580-read-text-file-from-remote-server/#findComment-1052541 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? Link to comment https://forums.phpfreaks.com/topic/200580-read-text-file-from-remote-server/#findComment-1053552 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.