ultimatum Posted October 21, 2010 Share Posted October 21, 2010 Hey guys, I have a script which parses data from websites. The script is set up to read pages links from .txt file into an array and then use foreach loop to iterate through each result. I've setup exception handling in my parsing class to print the link when file_get_contents() is unable to to read data and then exit the script. Issue: The script stops randomly after running for a while, it prints the link where file_get_contents() function failed but when I restart the script from that link particularly again the script works no problem until it stops again at some point. My question is: Is there a problem with a buffer?? or what could prevent file_get_contents() from executing after hundreds of iterations? The error is: .... failed to open stream ... on HTTP ... - a typical error when file_get_contents() function can't read a website. Your help is greatly appreaciated in advance, Thank you, ultimatum 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.