[function.fsockopen]:php_network_getaddresses:getaddrinfo failed:没有这样的主机是已知的

时间:2012-11-25 05:09:13

标签: host serversocket fsockopen

我在fsock打开时遇到了一些问题,但我是关于套接字的PHP的新手。

我的脚本警告是:

Warning: fsockopen() [function.fsockopen]: 
php_network_getaddresses: getaddrinfo failed: No such host is known

这是我的剧本:

            foreach($extend as $extra => $serv) {                       
                    $buffers = NULL;      
                    if ($socket = fsockopen($serv[0], 43)
                    /* lets we show system can't connect the server */
                    or die('error connect servers' . $socket));
                    fputs($socket, $vers.$extra . "\r\n");

                            while( !feof($socket) )
                            {
                                    $buffers .= fgets($socket,128);
                            }

                    fclose($socket);

0 个答案:

没有答案