文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>URL地址合法性检查php

URL地址合法性检查php

时间:2007-02-17  来源:PHP爱好者

URL地址合法性检查
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
关键词:PHP
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
这个类可以用来检查URL地址的合法性,目前支持ftp,file,http,https,gopher,news,nntp,telnet,wais.功能:
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
检查URL的合法性
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
技术资料:
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
Uniform Resource Locators (URL)
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
http://info.internet.isi.edu/in-notes/rfc/files/rfc1738.txt
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
Regex edition 0.12a
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
http://www.cs.utah.edu/dept/old/texinfo/regex/regex_toc.html
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
*/
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
class urlcheck{
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $regex = array(//协议名(注意在这里必须写成小写) => 对应的正则表达式
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
'ftp' => '$this->ftpurl',
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
'file' => '$this->fileurl',
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
'http' => '$this->httpurl',
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
'https' => '$this->httpurl',
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
'gopher' => '$this->gopherurl',
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
'news' => '$this->newsurl',
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
'nntp' => '$this->nntpurl',
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
'telnet' => '$this->telneturl',
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
'wais' => '$this->waisurl'
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
);
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $lowalpha;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $hialpha;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $alpha;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $digit;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $safe;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $extra;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $national;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $punctuation;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $reserved;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $hex;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $escape;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $unreserved;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $uchar;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $xchar;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $digits;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $urlpath;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $password;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $user;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $port;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $hostnumber;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $alphadigit;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $toplabel;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $domainlabel;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $hostname;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $host;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $hostport;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $login;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
//ftp
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $ftptype;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $fsegment;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $fpath;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $ftpurl;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
//file
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $fileurl;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
//http,https
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $search;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $hsegment;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $hpath;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $httpurl;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
//gopher
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $gopher_string;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $selector;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $gtype;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $gopherurl;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
//news
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $article;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $group;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $grouppart;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $newsurl;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
//nntp
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $nntpurl;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
//telnet
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $telneturl;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
//wais
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $wpath;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $wtype;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $database;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $waisdoc;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $waisindex;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $waisdatabase;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
var $waisurl;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
function check($url){
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$pos = @strpos($url,':',1);
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
if($pos<1) return false;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$prot = substr($url,0,$pos);
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
if(!isset($this->regex[$prot])) return false;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
eval('$regex = '.$this->regex[$prot].';');
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
return ereg('^'.$regex.'$',$url);
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
}
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
function urlcheck(){
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->lowalpha = '[a-z]';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->hialpha = '[A-Z]';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->alpha = '('.$this->lowalpha.'|'.$this->hialpha.')';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->digit = '[0-9]';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->safe = '[$.+_-]';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->extra = '[*()'!,]';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->national = '([{}|^~`]|[|])';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->punctuation = '[<>#%"]';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->reserved = '[?;/:@&=]';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->hex = '('.$this->digit.'|[a-fA-F])';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->escape = '(%'.$this->hex.'{2})';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->unreserved = '('.$this->alpha.'|'.$this->digit.'|'.$this->safe.'|'.$this->extra.')';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->uchar = '('.$this->unreserved.'|'.$this->escape.')';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->xchar = '('.$this->unreserved.'|'.$this->reserved.'|'.$this->escape.')';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->digits = '('.$this->digit.'+)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->urlpath = '('.$this->xchar.'*)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->password = '(('.$this->uchar.'|[?;&=]'.')*)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->user = '(('.$this->uchar.'|[?;&=]'.')*)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->port = $this->digits;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->hostnumber = '('.$this->digits.'.'.$this->digits.'.'.$this->digits.'.'.$this->digits.')';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->alphadigit = '('.$this->alpha.'|'.$this->digit.')';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->toplabel = '('.$this->alpha.'|('.$this->alpha.'('.$this->alphadigit.'|-)*'.$this->alphadigit.'))';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->domainlabel = '('.$this->alphadigit.'|('.$this->alphadigit.'('.$this->alphadigit.'|-)*'.$this->alphadigit.'))';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->hostname = '(('.$this->domainlabel.'.)*'.$this->toplabel.')';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->host = '('.$this->hostname.'|'.$this->hostnumber.')';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->hostport = '('.$this->host.'(:'.$this->port.')?)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->login = '(('.$this->user.'(:'.$this->password.')?@)?'.$this->hostport.')';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->ftptype = '[aidAID]';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->fsegment = '(('.$this->uchar.'|[?:@&=])*)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->fpath = '('.$this->fsegment.'(/'.$this->fsegment.')*)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->ftpurl = '([fF][tT][pP]://'.$this->login.'(/'.$this->fpath.'(;[tT][yY][pP][eE]='.$this->ftptype.')?)?)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->fileurl = '([fF][iI][lL][eE]://('.$this->host.'|[lL][oO][cC][aA][lL][hH][oO][sS][tT])?/'.$this->fpath.')';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->search = '(('.$this->uchar.'|[;:@&=])*)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->hsegment = '(('.$this->uchar.'|[;:@&=])*)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->hpath = '('.$this->hsegment.'(/'.$this->hsegment.')*)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->httpurl = '([hH][tT][tT][pP][sS]?://'.$this->hostport.'(/'.$this->hpath.'([?]'.$this->search.')?)?)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->gopher_string = '('.$this->xchar.'*)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->selector = '('.$this->xchar.'*)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->gtype = $this->xchar;
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->gopherurl = '([gG][oO][pP][hH][eE][rR]://'.$this->hostport.'(/('.$this->gtype.'('.$this->selector.'(%09'.$this->search.'(%09'.$this->gopher_string.')?)?)?)?)?)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->article = '(('.$this->uchar.'|[;/?:&=])+@'.$this->host.')';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->group = '('.$this->alpha.'('.$this->alpha.'|'.$this->digit.'|[-.+_])*)';
www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
$this->grouppart = '(
  • |'.$this->group.'|'.$this->article.')';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $this->newsurl = '([nN][eE][wW][sS]:'.$this->grouppart.')';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $this->nntpurl = '([nN][nN][tT][pP]://'.$this->hostport.'/'.$this->group.'(/'.$this->digits.')?)';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $this->telneturl = '([tT][eE][lL][nN][eE][tT]://'.$this->login.'/?)';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $this->wpath = '('.$this->uchar.'*)';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $this->wtype = '('.$this->uchar.'*)';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $this->database = '('.$this->uchar.'*)';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $this->waisdoc = '([wW][aA][iI][sS]://'.$this->hostport.'/'.$this->database.'/'.$this->wtype.'/'.$this->wpath.')';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $this->waisindex = '([wW][aA][iI][sS]://'.$this->hostport.'/'.$this->database.'[?]'.$this->search.')';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $this->waisdatabase = '([wW][aA][iI][sS]://'.$this->hostport.'/'.$this->database.')';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $this->waisurl = '('.$this->waisdatabase.'|'.$this->waisindex.'|'.$this->waisdoc.')';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    /*测试
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $urlcheck = new urlcheck();
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $url = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://localhost/test/a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'file://localhost/test/a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'http://localhost/test/a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'https://localhost/test/a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'gopher://localhost/test/a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'news:comp.os.linux',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'nntp://localhost/test/12',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'telnet://localhost/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'wais://localhost/db/type/path',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($url);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if($urlcheck->check($url[$i])) echo $url[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $url[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $waisurl = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'wais://localhost/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'wais://localhost/db',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'wais://localhost/db?a=b&c=d',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'wais://localhost/db/type/path',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'WAIS://localhost/db',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'wai://localhost/db',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'wais://localhost/db/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'wais://localhost/db/type/path/ext'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->waisurl.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($waisurl);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->waisurl.'$',$waisurl[$i])) echo $waisurl[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $waisurl[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $telneturl = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'telnet://localhost',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'telnet://localhost/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'TELNET://localhost',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'telnet://guest:guest@localhost',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'telne://localhost'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->telneturl.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($telneturl);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->telneturl.'$',$telneturl[$i])) echo $telneturl[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $telneturl[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $nntpurl = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'nntp://localhost/php/12',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'NNTP://localhost/php/12',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'nntp://localhost:119/php/12',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'nntp://localhost/php',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'nnt://localhost/php',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'nntp://localhost/php/'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->nntpurl.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($nntpurl);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->nntpurl.'$',$nntpurl[$i])) echo $nntpurl[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $nntpurl[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $newsurl = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'news:123@localhost',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'NEWS:123@localhost',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'news:comp.os.linux',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'news:*',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'news:http://www.phpchina.com/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'new:comp.os.linux',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'news:'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->newsurl.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($newsurl);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->newsurl.'$',$newsurl[$i])) echo $newsurl[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $newsurl[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $gopherurl = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'gopher://phpchina.com',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'gopher://phpchina.com/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'gopher://phpchina.com/atest%09search%09string',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'GOPHER://phpcina.com/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'goph://phpchina.com'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->gopherurl.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($gopherurl);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->gopherurl.'$',$gopherurl[$i])) echo $gopherurl[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $gopherurl[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $httpurl = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'http://www.phpchina.com',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'http://www.phpchina.com/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'http://www.phpchina.com/default.php',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'https://www.phpchina.com/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'HTTPS://www.phpchina.com/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'http://www.phpchina.com/?a=b&c=d',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'htt://www.phpchina.com/'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->httpurl.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($httpurl);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->httpurl.'$',$httpurl[$i])) echo $httpurl[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $httpurl[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $fileurl = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'file://localhost/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'FILE://localhost/tmp/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'file://ahost/test/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'file://localhost'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->fileurl.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($fileurl);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->fileurl.'$',$fileurl[$i])) echo $fileurl[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $fileurl[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $ftpurl = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://www.phpchina.com',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://www.phpchina.com/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://www.phpchina.com/test',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://www.phpchina.com/test/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://www.phpchina.com/test/abc/aa',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://www.phpchina.com:21',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://www.phpchina.com:21/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://[email protected]/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://@www.phpchina.com/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://:@www.phpchina.com/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://guest:@www.phpchina.com/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://guest:[email protected]/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://guest:[email protected]:21',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'Ftp://www.phpchina.com/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://www.phpchina.com/test;type=a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://www.phpchina.com/;type=a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'FTP://www.phpchina.com/;TYPE=A',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'www.phpchina.com',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ff://www.phpchina.com',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://www.phpchina.com;type=a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ftp://www.phpchina.com/;type=b'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->ftpurl.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($ftpurl);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->ftpurl.'$',$ftpurl[$i])) echo $ftpurl[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $ftpurl[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $login = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'www.chinaasp.com',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'www.phpchina.com',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '202.101.17.181',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'www.phpchina.com:80',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '202.101.17.181:80',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '[email protected]:80',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '[email protected]:80',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'guest:[email protected]:80',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'guest:[email protected]:80',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'guest:@www.phpchina.com:80',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'guest:@202.101.17.181:80',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '@www.phpchina.com:80',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '@202.101.17.181:80',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '@',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'guest@'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->login.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($login);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->login.'$',$login[$i])) echo $login[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $login[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $hostport = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'www.chinaasp.com',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'www.phpchina.com',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '202.101.17.181',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'www.phpchina.com:80',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '202.101.17.181:80',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'www.phpchina.com:abc'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->hostport.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($hostport);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->hostport.'$',$hostport[$i])) echo $hostport[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $hostport[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $host = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'www.chinaasp.com',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'www.phpchina.com',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '202.101.17.181',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'www.phpchina.com:80'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->host.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($host);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->host.'$',$host[$i])) echo $host[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $host[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $hostname = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'www.chinaasp.com',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'www.phpchina.com',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1.a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1.abc',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1.a-c',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1.ab-c',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1.a8-9',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1-2.a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1-2.abc',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1-2.a-c',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1-2.ab-c',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1-2.a8-9',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1-2.1-2.a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1-2.1-2.abc',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1-2.1-2.a-c',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1-2.1-2.ab-c',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1-2.1-2.a8-9',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'e',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'z',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'A',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'E',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'Z',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'abc',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a-c',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ab-c',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ab-9',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a8-9',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '123',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1a3',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1-3',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'abc*',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '!safa'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->hostname.' 测试
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($hostname);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->hostname.'$',$hostname[$i])) echo $hostname[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $hostname[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $hostnumber = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '202.101.17.181',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '127.0.0.1',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '202.101.17.',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '202.101..',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '202...',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '....',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ab.cd.ef.gh'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->hostnumber.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($hostnumber);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->hostnumber.'$',$hostnumber[$i])) echo $hostnumber[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $hostnumber[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $lowalpha = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'e',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'z',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'A',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '0',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ae'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->lowalpha.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($lowalpha);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->lowalpha.'$',$lowalpha[$i])) echo $lowalpha[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $lowalpha[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $hialpha = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'A',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'E',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'Z',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '2',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'AB'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->hialpha.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($hialpha);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->hialpha.'$',$hialpha[$i])) echo $hialpha[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $hialpha[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $alpha = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'e',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'z',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'A',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'E',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'Z',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ab',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'AB',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a1'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->alpha.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($alpha);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->alpha.'$',$alpha[$i])) echo $alpha[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $alpha[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $digit = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '0',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '4',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '9',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '12',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ab'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->digit.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($digit);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->digit.'$',$digit[$i])) echo $digit[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $digit[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $hex = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '0',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '4',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '9',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'e',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'f',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'A',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'E',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'F',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '01',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'G',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'g',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ab'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->hex.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($hex);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->hex.'$',$hex[$i])) echo $hex[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $hex[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $digits = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '0',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '4',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '9',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '12',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '124',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'afasdf'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->digits.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($digits);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->digits.'$',$digits[$i])) echo $digits[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $digits[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $xchar = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'e',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'z',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'A',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'E',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'Z',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '0',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '5',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '9',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '$',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '+',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '_',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '-',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '*',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '(',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ')',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ''',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '!',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ',',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '?',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ':',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '@',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '&',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '=',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%02',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%a0',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%af',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ae',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'AE',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '$-',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '*)',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '?/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%0z',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%az',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%abc',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%012'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->xchar.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($xchar);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->xchar.'$',$xchar[$i])) echo $xchar[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $xchar[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $uchar = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'e',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'z',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'A',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'E',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'Z',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '0',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '5',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '9',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '$',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '+',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '_',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '-',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '*',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '(',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ')',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ''',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '!',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%02',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%a0',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%Af',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ab',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'Aa',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '01',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '$+',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '(!',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%124',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%abc',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%az'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->uchar.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($uchar);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->uchar.'$',$uchar[$i])) echo $uchar[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $uchar[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $unreserved = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'e',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'z',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'A',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'E',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'Z',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '0',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '5',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '9',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '$',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '+',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '_',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '-',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '*',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '(',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ')',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ''',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '!',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ',',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'ab',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'Ab',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '01',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '$.',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '*('
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->unreserved.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($unreserved);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->unreserved.'$',$unreserved[$i])) echo $unreserved[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $unreserved[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $reserved = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '/',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '?',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ':',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '@',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '&',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '=',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '=='
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->reserved.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($reserved);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->reserved.'$',$reserved[$i])) echo $reserved[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $reserved[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $punctuation = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '<',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '>',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '#',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '"',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '<<',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '>>',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->punctuation.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($punctuation);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->punctuation.'$',$punctuation[$i])) echo $punctuation[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $punctuation[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $national = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '{',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '}',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '|',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '^',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '~',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '[',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ']',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '`',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '``',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '^^'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->national.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($national);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->national.'$',$national[$i])) echo $national[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $national[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $safe = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '$',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '-',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '_',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '+',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '1',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '$$'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->safe.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($safe);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->safe.'$',$safe[$i])) echo $safe[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $safe[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE

    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $extra = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '!',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '*',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ''',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '(',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ')',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ',',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'a'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->extra.'测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($extra);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->extra.'$',$extra[$i])) echo $extra[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $extra[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $escape = array(
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%12',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%1a',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%A1',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    'error',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%az',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%123',
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '%abc'
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    );
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    echo '
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    '.$urlcheck->escape.' 测试...
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    --------------------------------------------------------------------------------
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    $count = count($escape);
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    for($i=0;$i<$count;$i++){
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    if(ereg('^'.$urlcheck->escape.'$',$escape[$i])) echo $escape[$i].' ==> 合法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    else echo $escape[$i].' ==> 非法
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ';
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    }
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    */
    www.chinaitpower.com5S12nH3aP0NQq2aCZbmGrJznE
    ?>
    php爱好者站 http://www.phpfans.net php动态|php基础|php进阶|php模板.
  • 相关阅读 更多 +
    排行榜 更多 +
    辰域智控app

    辰域智控app

    系统工具 下载
    网医联盟app

    网医联盟app

    运动健身 下载
    汇丰汇选App

    汇丰汇选App

    金融理财 下载