PHP IPwhois类

一人去远方

一人去远方

2016-01-29 15:05

PHP IPwhois类,PHP IPwhois类
 

原来写的IPwhois类

(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/php/)

 <?php
/*
*
* Class : IP Whois Verson 1.0
* Info : Get IP's information form 4 whois server
* Author : PhpUp Studio
* Date : 12/12/2004
* www.knowsky.com
*
*/
class IPWhois
{
        var $server = 'whois.arin.net';
        var $target;
        var $timeout = 10;
        var $msg;
       
        function IPWhois($target)
        {
                $this-target = $target;       
        }
        function ShowInfo()
        {
                if($this-_CheckIP($this-target))
                {
                        $this-msg = $this-_GetInfo($this-server);
                        if($this-_CheckInfo($this-msg))
                        {
                                $this-msg = $this-_GetInfo($this-server);
                        }
                }
                else $this-msg = '<pPlease Enter An IP Address<br</p';
               
                return $this-msg;       
        }
        function _CheckIP($temptarget)
        {
                if(eregi("[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}", $temptarget))
                {
                        $f = 1;
                        $detail = explode(".",$temptarget);
                        foreach($detail as $v)
                        {
                                if($v 255 || $v < 0)
                      &nbs

展开更多 50%)
分享

猜你喜欢

PHP IPwhois类

PHP
PHP IPwhois类

php分页类

Web开发
php分页类

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

php基类 调试类 错误类

Web开发
php基类 调试类 错误类

PHP 中的类

Web开发
PHP 中的类

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

php+oracle 分页类

PHP
php+oracle 分页类

PHP中的“人”类

PHP
PHP中的“人”类

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

《影之刃》轻羽角色培养及PVP高手心得

《影之刃》轻羽角色培养及PVP高手心得

轻型数据库SQLite结合PHP的开发

轻型数据库SQLite结合PHP的开发
下拉加载更多内容 ↓