Initial commit.
This commit is contained in:
38
lib/php/monica/urlregex.inc.php
Normal file
38
lib/php/monica/urlregex.inc.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
// File name: urlregex.inc.php
|
||||
// Description: PHP subroutine to for URL-related regular-expression patterns
|
||||
// Date: 2004-02-11
|
||||
// Author: imacat <imacat@pristine.com.tw>
|
||||
// Copyright: Copyright (C) 2004-2007 Pristine Communications
|
||||
|
||||
// Set the include path
|
||||
if (!defined("INCPATH_SET")) {
|
||||
require_once dirname(__FILE__) . "/incpath.inc.php";
|
||||
}
|
||||
// Referenced subroutines
|
||||
require_once "monica/html401.inc.php";
|
||||
require_once "monica/rfc1738.inc.php";
|
||||
require_once "monica/rfc2396.inc.php";
|
||||
require_once "monica/rfc822.inc.php";
|
||||
|
||||
define("URLREGEX_SCHEME", RFC1738_SCHEME);
|
||||
|
||||
define("URLREGEX_FTP", RFC1738_FTPURL);
|
||||
define("URLREGEX_FILE", RFC1738_FILEURL);
|
||||
define("URLREGEX_HTTP", "[hH][tT][tT][pP]:\\/\\/" . RFC2396_SERVER . "(?:" . RFC2396_ABS_PATH . ")?(?:\\?" . RFC2396_QUERY . ")?(?:#" . HTML401_ID . ")?");
|
||||
define("URLREGEX_HTTPS", "[hH][tT][tT][pP][sS]:\\/\\/" . RFC2396_SERVER . "(?:" . RFC2396_ABS_PATH . ")?(?:\\?" . RFC2396_QUERY . ")?(?:#" . HTML401_ID . ")?");
|
||||
define("URLREGEX_GOPHER", RFC1738_GOPHERURL);
|
||||
define("URLREGEX_MAILTO", RFC1738_MAILTOURL);
|
||||
define("URLREGEX_NEWS", RFC1738_NEWSURL);
|
||||
define("URLREGEX_NNTP", RFC1738_NNTPURL);
|
||||
define("URLREGEX_TELNET", RFC1738_TELNETURL);
|
||||
define("URLREGEX_WAIS", RFC1738_WAISURL);
|
||||
define("URLREGEX_PROSPERO", RFC1738_PROSPEROURL);
|
||||
|
||||
define("URLREGEX_URL", "(?:" . URLREGEX_FTP . "|" . URLREGEX_FILE
|
||||
. "|" . URLREGEX_HTTP . "|" . URLREGEX_HTTPS . "|" . URLREGEX_GOPHER
|
||||
. "|" . URLREGEX_MAILTO . "|" . URLREGEX_NEWS . "|" . URLREGEX_NNTP
|
||||
. "|" . URLREGEX_TELNET . "|" . URLREGEX_WAIS . "|" . URLREGEX_PROSPERO . ")");
|
||||
define("URLREGEX_EMAIL", RFC822_ADDR_SPEC);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user