I've posed a similar question in General Help, but my problem is still unsolved. I hope to receive some more feedback in this Coding forum.
I have a php script scheduled to do some routined tasks under cronjobs. The primary code execution is the following 3 lines:
$filename = "http://www.domain.com/image.jpg";
$size = @getimagesize ($filename);
$fp = @fopen($filename, "r");
But sometimes due to the extremely slow connectivity to the remote url, my code execution got stuck, and it took 5 - 10+ minutes to get through.
If there some way for me to set a timer, such that after 60 seconds of unsuccessful waiting (before the complete data is fetched), this portion of code will be skipped and return a flag of indication?
Thanks.