I am doing something that reads my clients' websites using regular expressions and I think the script might take some time occasionally. want to build this right so, how would I do something of a TIMEOUT in php where if this line:
if(preg_match_all('/expression here/i', $page, $results)){
//process results
}
did not process in say 15 seconds the script would go on to the next line.
I have never done that before and think that the only way it might be possible is with threading (multithreading) - if this is true I'd really need some links and handholding and will def. share this with the community as this is an excellent example of advanced use of php. I've contributed functions and the like before 🙂
Thanks!
Samuel