phpip数据库查询 phpstudy查看数据库( 二 )


$whois,
$Text['sock_connect']);
$buffer
.=
ReadSocket($whois,$IP);
}
else
{
$buffer
.=
$buffer1;
}
}
return
nl2br($buffer);
}
function
SubStrByTag($firstTag,$secondTag,$longStr)
{
$firstPos
=
strpos
($longStr,$firstTag);
$ret
=
'';
if
($firstPos
!==
FALSE)
{
$secondPos
=
strpos
($longStr,$secondTag,$firstPos);
if
($secondPos
!==
FALSE)
{
$firstPos
+=
strlen($firstTag);
$ret
=
substr($longStr,$firstPos,$secondPos-$firstPos);
}
}
return
$ret;
}
function
ReadSocket($whois,$ip)
{
global
$Text;
$buffer
=
'';
if
(!$sock
=
fsockopen(
$whois,
43,
$errNum,
$errStr,
20))
{
$buffer
=
str_replace('%SERVER%',
$whois,
$Text['sock_fail']);
}
else
{
fputs($sock,"$ip\n");
//$buffer
=
fread($sock,
8192);
while(!feof($sock))
$buffer.=fgets($sock,
8192);
fclose($sock);
}
return
$buffer;
}
?
语言文件:
lang.inc.php
?php
$Text
=
Array(
'ip_invalid'='I
want
to
get
a
valid
IP,
but
it
is
[%IP%].',
'sock_connect'='Ask
%SERVER%
...
',
'sock_fail'='Cannot
connect
to
the
host:%SERVER%'
);
?
其phpip数据库查询他有名的whois服务器
1.Tucows
(whois.opensrs.net)
一次只能一个连接
dnsstuff就是查询的它
2.BulkRegister
(whois.bulkregiter.net)
小心它临时封IP,如果大量连接的话
3.Network
Solutions
(whois.networksolutions.com)
一天只能查1000次
4.Go
Daddy
(whois.godaddy.com)
5.whois.abuse.net
【phpip数据库查询 phpstudy查看数据库】关于phpip数据库查询和phpstudy查看数据库的介绍到此就结束了 , 不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。

推荐阅读