Forum Moderators: coopster
I have been using the file() function for quite some time without fail, until yesterday. I am getting an error when I use it as such:
$url = "http://www.example.com";
$data = implode('', file($url));
This is the error I'm getting:
Warning: file(http://www.example.com) [function.file]: failed to open stream: HTTP request failed! HTTP/1.1 999 in /filetest.php on line 3
I'm using it on a site that has other pages that work with the same code that's giving me errors now but for whatever reason, I'm getting this error and have no clue what it means. I'm also getting an implode() error but I know that is because the file() isn't working.
Any help would be greatly appreciated.
Warning: main() [function.include]: Failed opening 'http://www.example.com' for inclusion (include_path='.:/usr/local/lib/php') in /filetest.php on line 2
Is this just me or is this weird?
Since I can't post the urls here I will send out a couple of SM's so you can see what I'm getting at.
Look at the following thread: file get contents + non existing URL's [webmasterworld.com]
<edit> Reading back the post, this might not be the case </edit>
[edited by: Habtom at 5:05 am (utc) on Nov. 8, 2007]
[bugs.php.net...]