好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

一个女孩怀孕了她老爸只说了8个字一个用于网络的工具函数库

/*
PHP Net Toolpack v0.1 08.05.2000,
by waddler(@netlife.fi)
phpnettoolpack.sourceforge.net
To be distributed under GNU GPL
*/
// whois(hostname [,username, [port]])
Function whois ($a_server, $a_query="", $a_port=43) {
$sock = fsockopen($a_server, $a_port, &$errno, &$errstr, 10);
if (!$sock)
{
echo "$errstr ($errno)
n";
} else {
fputs($sock, "$a_queryrn");
while(!feof($sock))
{
$buf = fgets($sock,128);
if (ereg( "Whois Server:", $buf))
{
$a_server = str_replace( "Whois Server: ", "", $buf);
$a_server = trim($a_server);
}
}
fclose($sock);
if ($a_server)
{
print "$a_query is registered at $a_server:
";
$sock = fsockopen($a_server, 43, &$errno, &$errstr, 10);
if(!$sock)
{
echo "Could not open connection to $a_server on port $a_port.n";
echo "$errstr ($errno)
n";
} else {
fputs($sock, "$a_queryrn");
while(!feof($sock))
{
echo fgets($sock,128);
}
fclose($sock);
}
} else {
echo "$a_query was not found.
";
}
}
}
// finger(hostname [,username, [port]])
Function finger ($a_server, $a_query="", $a_port=79) {
$sock=fsockopen($a_server,$a_port, &$errno, &$errstr, 10);
if (!$sock)
{
$ret_str = "$errstr ($errno)
n";
} else {
fputs($sock,"$a_queryn");
while (!feof($sock)) { $ret_str .= fgets($sock,128); }
fclose($sock);
}
echo $ret_str;
return $ret_str;
}
// traceroute(hostname)
Function traceroute ($a_query) {
exec("traceroute $a_query",$ret_strs);
$str_count = count($ret_strs);
for ($count=0; $count print "$count/$str_count".$ret_strs[$count]."n";
}
// -----------------------------------------------------------
$app_name = "PHP Net Toolpack";
$app_version = "0.1";
$TOOLS = array(
"finger" => "Finger",
"traceroute" => "Traceroute",
"whois" => "Whois?"
);
// when included inside on a html file ..
if ($tool=="listtools")
{
while (list($key, $val) = each($TOOLS)) {
print " ".$val." n";
}
exit;
}
// print appropriate html header
print " ";
if ($tool)
{
print " ".$tool." for ".$query." n";
print "n

".$tool." for ".$query." .. n";
} else {
print " ".$app_name." n";
print "n

".$app_name." n";
}
// check what tool they want to use and do what is necessary
switch($tool) {
case "finger":
if ($query)
{
print "
n"; 
finger($server, $query);
print "
";
} else {
?>

}
break;
case "traceroute":
if ($query)
{
print "
n"; 
traceroute($query);
print "
";
} else {
?>

}
break;
case "whois":
if ($query)
{
print "
n"; 
whois($server,$query);
print "
";
} else {
?>

To look up a NIC handle, host name, or registrant,
use one of the keywords below:

To search by NIC handle (or contact), type "handle WA3509"

To search by name, type "name lastname, firstname"

To search by company name, type "name The Sample Corporation"

To search by domain name, type "example测试数据"

To search by IP address, type "host 121.23.2.7"

To search by host or nameserver name, type "host ns1.worldnic测试数据"

(examples are from networksolutions测试数据)
-->

}
break;
default:
print " Currently supported tools are:n";
while (list($key, $val) = each($TOOLS)) {
echo " ".$val." n";
}
print " n";
break;
}
print "n ".$app_name." v".$app_version." n";
print "n ";
?>

以上就介绍了一个女孩怀孕了 她老爸只说了8个字 一个用于网络的工具函数库,包括了一个女孩怀孕了 她老爸只说了8个字方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

查看更多关于一个女孩怀孕了她老爸只说了8个字一个用于网络的工具函数库的详细内容...

  阅读:48次

CopyRight:2016-2025好得很程序员自学网 备案ICP:湘ICP备09009000号-16 http://www.haodehen.cn
本站资讯不构成任何建议,仅限于个人分享,参考须谨慎!
本网站对有关资料所引致的错误、不确或遗漏,概不负任何法律责任。
本网站刊载的所有内容(包括但不仅限文字、图片、LOGO、音频、视频、软件、程序等)版权归原作者所有。任何单位或个人认为本网站中的内容可能涉嫌侵犯其知识产权或存在不实内容时,请及时通知本站,予以删除。

网站内容来源于网络分享,如有侵权发邮箱到:kenbest@126.com,收到邮件我们会即时下线处理。
网站框架支持:HDHCMS   51LA统计 百度统计
Copyright © 2018-2025 「好得很程序员自学网
[ SiteMap ]