Any one have a way to timout an fsockopen on a windows system running an apache server? I try to open some remote sites and the script just hangs because it can't seem to reach the site, the timeout in fsockopen doesn't do anything nor does fsockopen() or die() or anything else that I've come up with. I'd like to time it out after say 10 seconds and have it move on with a die() containing a meta refresh with an incremented id to pull up the next site from the database.
Look into [man]set_time_limit[/man]
It'd be nice if set_time_limit() or die() worked, but when the time_limit is up, the script just returns a fatal error, execution time exceeded.