You are here: Timing out a remote call « PHP « IT news, forums, messages
Timing out a remote call

Posted by Brian Dunning on 08/05/05 01:01

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?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация