HTTP request failed! HTTP/1.1 404 Not Found via PHP file_get_contents()

Last week, I was writing a PHP script which heavily depended on file_get_contents function. Mind you, am using Xampp as my developmental server and everything seems to be working perfectly. So I left it to attend to other issues.
After some hours, I decided to run the script to make sure everything is fine. But to my greatest surprise, I was greeted with this weird error:

Warning: file_get_contents(http://xyz.com/email100.png ): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:\xampp\htdocs\sandbox2\index.php on line 20

I decided to upload and run the script on a live server and everything was perfectly working.

After reading this StackOverflow thread, I guess the problem had to be from my ISP. After some hours, I came back to it, restarted Apache and everything was working fine.

Wheeew!!! i was indeed very relieved.

Don’t miss out!
Subscribe to My Newsletter
Invalid email address