I have written a link checker which loops through a list of links, checks for the recip and tracks trhe results. Each recursion through the loop I set fsockopen timeout to 30 secs, and script time oput to 40 secs.
The problem comes up when the connection has been made, but the GET request stalls. The script will timeout and exit. I have tried regestering a tick function to track the time elapsed and abort the connection if X time has elapsed. Unfortunantly, the tick functioin is apparently not called once the socket connection has been made, so it can't break the connection.
Any ideas how I might limit the time the GET request is allowed to continue?
The problem comes up when the connection has been made, but the GET request stalls. The script will timeout and exit. I have tried regestering a tick function to track the time elapsed and abort the connection if X time has elapsed. Unfortunantly, the tick functioin is apparently not called once the socket connection has been made, so it can't break the connection.
Any ideas how I might limit the time the GET request is allowed to continue?