Re: [php] php_network_getaddresses: getaddrinfo failed: No such host is known

From: Date: Wed, 27 May 2009 12:25:51 +0000
Subject: Re: [php] php_network_getaddresses: getaddrinfo failed: No such host is known
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-293201@lists.php.net to get a copy of this message
$port ="xx"; $ip ="xx"; $con =$transport = "tcp"; On Wed, May 27, 2009 at 1:24 PM, Stuart <stuttle@gmail.com> wrote: > 2009/5/27 HELP! <izoduwa@gmail.com>: > > Hi, > > error: > > php_network_getaddresses: getaddrinfo failed: No such host is known > > > > $fstream = stream_socket_client("$con:$ip:$port", $errno, $errstr, > > $timeout); > > > > if($fstream){ > > $br = fwrite($fstream,$login_request_block); > > $str = stream_get_contents($fstream); > > print( "Connection successful: $str "); > > } > > else{ > > return " str: $str<br>write:$br<br> $errstr ($errno)"; > > } > > > > What could be the error > > What's in $con? I'm guessing "tcp" in which case the first parameter > to stream_socket_client is wrong. See the manual for details: > http://php.net/stream_socket_client > > In future please consult the manual and double-check that you're > passing valid arguments to the functions you're using before asking on > this list. > > -Stuart > > -- > http://stut.net/ > -- www.bemycandy.com

« previous php.general (#293201) next »