当前位置: 网学 > 编程文档 > PHP > 正文

一个用PHP实现的UBB类

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/17
下载{$ArticleTitle}原创论文样式
;gopherurl'',
''news'' => ''$this->newsurl'',
''nntp'' => ''$this->nntpurl'',
''telnet'' => ''$this->telneturl'',
''wais'' => ''$this->waisurl''
);

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

var $urlpath;
var $password;
var $user;
var $port;
var $hostnumber;
var $alphadigit;
var $toplabel;
var $domainlabel;
var $hostname;
var $host;
var $hostport;
var $login;

//ftp
var $ftptype;
var $fsegment;
var $fpath;
var $ftpurl;

//file
var $fileurl;

//http,https
var $search;
var $hsegment;
var $hpath;
var $httpurl;

//gopher
var $gopher_string;
var $selector;
var $gtype;
var $gopherurl;

//news
var $article;
var $group;
var $grouppart;
var $newsurl;

//nntp
var $nntpurl;

//telnet
var $telneturl;

//wais
var $wpath;
var $wtype;
var $database;
var $waisdoc;
var $waisindex;
var $waisdatabase;
var $waisurl;

function check($url){
$pos = @strpos($url,'':'',1);
if($pos<1) return false;
$prot = substr($url,0,$pos);
if(!isset($this->regex[$prot])) return false;
eval(''$regex = ''.$this->regex[$prot].'';'');
return ereg(''^''.$regex.''
  • 下一篇资讯: 用php实现广告轮播
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号
    ',$url);
    }

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

    $this->urlpath = ''(''.$this->xchar.''*)'';
    $this->password = ''((''.$this->uchar.''|[?;&=]''.'')*)'';
    $this->user = ''((''.$this->uchar.''|[?;&=]''.'')*)'';
    $this->port = $this->digits;
    $this->hostnumber = ''(''.$this->digits.''.''.$this->digits.''.''.$this->digits.''.''.$this->digits.'')'';
    $this->alphadigit = ''(''.$this->alpha.''|''.$this->digit.'')'';
    $this->toplabel = ''(''.$this->alpha.''|(''.$this->alpha.''(''.$this->alphadigit.''|-)*''.$this->alphadigit.''))'';
    $this->domainlabel = ''(''.$this->alphadigit.''|(''.$this->alphadigit.''(''.$this->alphadigit.''|-)*''.$this->alphadigit.''))'';
    $this->hostname = ''((''.$this->domainlabel.''\\.)*''.$this->toplabel.'')'';
    $this->host = ''(''.$this->hostname.''|''.$this->hostnumber.'')'';
    $this->hostport = ''(''.$this->host.''(:''.$this->port.'')?)'';
    $this->login
    上一页12345下一页
    点击进入论坛和大家一起交流设计,分享设计素材,结交设计朋友
  • 上一篇资讯: 用PHP和SQL Sever实现分页显示
  • 下一篇资讯: 用php实现广告轮播
  • 相关资讯

    网学推荐

    免费论文

    原创论文

    文章排行榜

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号