For one project, I'm required to access a web service for every page. Basically it returns a little bit of random text. I have no control over the web service, and there is no possibility of cacheing or bringing it locally: the requirements are that it be accessed live across the Internet every time.

Most times it's instantaneous, but sometimes it can hang. I want to give it a half-second timeout, which we're allowed to do, but there's no documentation provided. Here is how we call it now (really simple):

  include('http://04planet.info/kfc/grab_one.php');

I have STFW and RTFM and could only find vague references like "use fsockopen instead" or "stream_set_timeout()" but I can't find an actual complete working example anywhere. Any pointers?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to