isUri() public static method

..
public static isUri ( string $value, integer $mode = self::ISPK_URI_ALLOW_COMMON ) : boolean
$value string
$mode integer
return boolean
Example #1
0
 /**
  *
  */
 public function testIsUri9()
 {
     $input = 'http://news.bbc.co.uk/2/hi/middle_east/8277040.stm';
     $this->assertTrue(Inspekt::isUri($input));
 }
Example #2
0
<?php

require_once dirname(__FILE__) . "/../vendor/autoload.php";
use Inspekt\Inspekt;
$URIs = array('//lessthan', 'ftp://*****:*****@123.444.999.12/', 'http://spinaltap.micro.umn.edu/00/Weather/California/Los%lngeles', 'http://funkatron.com/////////12341241', 'http://funkatron.com:12', 'http://funkatron.com:8000/#foo', 'https://funkatron.com', 'https://funkatron.com:42/funky.php?foo[]=bar', 'http://www.w3.org/2001/XMLSchema');
foreach ($URIs as $uri) {
    echo 'Testing ' . $uri . '<br/>';
    $rs = Inspekt::isUri($uri);
    echo "<pre>";
    var_dump($rs);
    echo "</pre>\n";
    echo "<hr>";
}