PHP IPwhois类

2016-01-29 15:05 3 1 收藏

PHP IPwhois类,PHP IPwhois类

【 tulaoshi.com - PHP 】

 

原来写的IPwhois类

(本文来源于图老师网站,更多请访问https://www.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

来源:https://www.tulaoshi.com/n/20160129/1495202.html

延伸阅读
标签: PHP
这篇短文写的不错,用PHP来解释UML(或者反过来说)可以说是一个创新了,通过这篇文章,我也发现了一个好站: www.phppatterns.com 。各UML术语的翻译来源于我正在看的《UML用户指南(The Unified Modeling Language User Guide)》一书。 UML(Unified Modeling Language, 统一建模语言)是一种通过图的方式表示软件的机制。本质上...
标签: Web开发
代码如下: ?php class Email { //---设置全局变量 var $mailTo = ""; // 收件人 var $mailCC = ""; // 抄送 var $mailBCC = ""; // 秘密抄送 var $mailFrom = ""; // 发件人 var $mailSubject = ""; // 主题 var $mailText = ""; // 文本格式的信件主体 var $mailHTML = ""; // html格式的信件主体 var $mailAttachments = ""; // ...
标签: Web开发
代码如下: ?php  class html  {      var $dir;        //dir for the htmls(without/)      var $rootdir;    //root of html files(without/):html  &n...
。?php /** * a class use to connect the MySQL database and do some query * wayne ,Mar 11, 2002 */ class dbClass { var $hostName = "localhost"; var $dbName = "exhibit"; var $Login = "wayne"; var $Password = "xiao"; var $conn; var $result; function dbClass(){ $this-conn = mysql_connect("$hostName","$this-Login","$thi...
标签: PHP
  PHP的类--功能齐全的发送邮件类 前面我们已经介绍过了一个用于群发邮件的类,那个类的功能只能发文本格式的邮件,下面这个类的功能则很强大,不但能发html格式的邮件,还可以发附件 <?php   class Email  {    //---设置全局变量   var $mailTo = ""; // 收件人  ...

经验教程

332

收藏

15

精华推荐

PHP 如何调用 JAVA 类库

PHP 如何调用 JAVA 类库

陌染_秋璃

一个php目录类

一个php目录类

小火鸡06

php入门mysql分页PageQuery类

php入门mysql分页PageQuery类

RIBUG

微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部