Hi,
I've been struggling for days trying to get a screen scrape to work which just goes off to a carrier's tracking website and looks to see if a parcel I have posted has been delivered yet - I'm trying to stop it being such a time consuming manual process!
It all seems to work ok, except I can only get the results from the last 22 scrapes I attempt.
If I send 30 requests using curl_multi_exec the first 8 always come back 'couldn't connect to host' and the last 22 work.
I have tried reversing the order of the requests and I get the same reuslt - 8 failed, 22 worked but because I did the requests in reverse, the 8 that failed first time around worked this time and 8 of the requests that worked first time around failed this time!
I've no idea what is going on but am guessing it's the carrier's server blocking me?
Here's the options I have set for curl:
CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1");
CURLOPT_MAXCONNECTS, 15);
CURLOPT_FAILONERROR, true);
CURLOPT_FOLLOWLOCATION, true);
CURLOPT_AUTOREFERER, true);
CURLOPT_RETURNTRANSFER,true);
I was hoping the MAXCONNECTS would do the job but unfortunately not 🙁
Could it be my server blocking the attempts? If that sounds possible, how can I check?
Can you help me get this working?