我对 fsock open 有一些问题,但我是关于套接字的 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);