Source for file Web.class.php
Documentation is available at Web.class.php
* Gumbo Library Framework
* This library is being released under the terms of the New BSD License. A
* copy of the license is packaged with the software (LICENSE.txt). If no
* copy is found, a copy of the license template can be found at:
* http://www.opensource.org/licenses/bsd-license.php
* @copyright Copyright (c) 2007, iBayou, Michael Luster
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @author Michael Luster <mluster79@yahoo.com>
* @link http://sourceforge.net/projects/phpgumbo
* @copyright Copyright (c) 2007, iBayou, Michael Luster
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @author Michael Luster <mluster79@yahoo.com>
* @link http://sourceforge.net/projects/phpgumbo
* @desc Web Validation Class
* @param bool $throw throw Exceptions
* @param int $level Error Level thrown
public function __construct ($throw=
false, $level=
null) {
* Returns if the value is an Email Address
* @throws Gumbo_Exception
$this->isMatch ($val, "^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$");
* Returns if the value is a URL
* @throws Gumbo_Exception
public function isUrl ($val) {
$this->isMatch ($val, "^((ht|f)tp://)?(([a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3}))|(([0-9]{1,3}.){3}([0-9]{1,3})))$");
* Returns if the value is an IP Address
* @throws Gumbo_Exception
$this->isMatch ($val, "([0-255]{1,3}).([0-255]{1,3}).([0-255]{1,3}).([0-255]{1,3})");