Problem with Net_Socket

From: Date: Fri, 12 May 2006 07:29:22 +0000
Subject: Problem with Net_Socket
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24052@lists.php.net to get a copy of this message
Hi all. I'm using HTTP_Request to retrieve an image from a remote server, works fine, until a customer entered an URL with a small mistake in it. The domain couldn't be resolved, and the request ends in: Error [2] fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known; Fatal error in line 138 of file /usr/share/php5/PEAR/Net/Socket.php As far as I can see fsockopen() shouldn't die when it can't connect to the URL, or am I wrong with this? What can I do to avoid this error? I'd like to get a PEAR_Error on connection problems... Bye, Stephan

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.pear.general (#24052) next »