Onbekend |
|
Zoeken!:|
<?php
function control_url($in) {
$start = "(http(s)?:\/\/)"; // http://
$url = "([\w_-]+)(\.[\w_-]+)*"; // www.bla.com
$user = "(\/\~[\w_-]+)?"; // userdir
$eind = "(\/[^\040\t\r\n\.\?]+(\.[^\040\t\r\n\.\?]+)*)*(\/)?"; // files en folders
$qstring = "(\?[\w_-]+\=([^\#\040\t\r\n]+)(\&[\w_-]=[^\#\040\t\r\n]+)*)?"; // querystring
$bkmrk = "(#[\w_-]+)?"; // bookmark
$exp = "/^".$start.$url.$user.$eind.$qstring.$bkmrk."$/i";
return preg_match($exp, $in);
}
?>
<?php function control_url($in) { $start = "(http(s)?:\/\/)"; // http:// $url = "([\w_-]+)(\.[\w_-]+)*"; // www.bla.com $user = "(\/\~[\w_-]+)?"; // userdir $eind = "(\/[^\040\t\r\n\.\?]+(\.[^\040\t\r\n\.\?]+)*)*(\/)?"; // files en folders $qstring = "(\?[\w_-]+\=([^\#\040\t\r\n]+)(\&[\w_-]=[^\#\040\t\r\n]+)*)?"; // querystring $bkmrk = "(#[\w_-]+)?"; // bookmark $exp = "/^".$start.$url.$user.$eind.$qstring.$bkmrk."$/i"; } ?>
Van f4ng0rn:p |