fsockopen problems

From: Date: Fri, 22 Jun 2007 16:18:53 +0000
Subject: fsockopen problems
Groups: php.general 
Request: Send a blank email to php-general+get-257654@lists.php.net to get a copy of this message
hello, I'm having some problems with fsockopen and was hopping for some help. I try to connect to a host via fsockopen and I get "getaddrinfo failed" errors, but if I try fsockopen with google, everything works. sample test code $fp=fsockopen('apps.subname.domain.com/xml_2.4/xml.php',80,$errno, $errstr); var_dump($errno); var_dump($errstr); $fp=fsockopen("000.00.00.000/xml_2.4/xml.php",80,$errno, $errstr); var_dump($errno); var_dump($errstr); $fp=fsockopen('www.google.ca',80,$errno, $errstr); var_dump($errno); var_dump($errstr); (sorry for sanitizing, not my choice.) I can ping the host from the server, and going to this site in a browser gives the expected output. Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known in /usr/local/www/apache22/data/index.php on line 119 Warning: fsockopen() [function.fsockopen]: unable to connect to apps.subname.domain.com/xml_2.4/xml.php:80 (Unknown error) in /usr/local/www/apache22/data/index.php on line 119 int(0) string(0) "" [note no error for google. should be here] Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known in /usr/local/www/apache22/data/index.php on line 122 Warning: fsockopen() [function.fsockopen]: unable to connect to 000.00.00.000/xml_2.4/xml.php:80 (Unknown error) in /usr/local/www/apache22/data/index.php on line 122 int(0) string(0) "" int(0) string(0) ""

« previous php.general (#257654) next »