Hey all,

I'm doing some maintenance work on an existing system and there is a piece of code that uses file_get_contents() to read data from a URL, which is fine in theory I suppose.

But the problem is sometimes the server where that URL lives is not available, and the system hangs indefinitely.

Shouldn't this be done with curl, and if so can it be done so that the call will time out and return control back when the server is not available?

Any other recommendations?

I just came across this code and it's one of the client's biggest complaints.

--
====================================
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com
------------------------------------
Those of you who believe in
telekinesis, raise my hand.
 -- Kurt Vonnegut

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

Reply via email to