dopaminadarktheme
Full Dopamina Dark Theme
function urlValidation($url){ // check the protocol link //$urlregex = "^(https?|ftp)\:\/\/"; $urlregex = "^(https?|mms?|rtsp?|ftp)\:\/\/"; // check user and password to htaccess conection $urlregex .= "([a-z0-9+!*(),;?&=\$_.-]+(\:[a-z0-9+!*(),;?&=\$_.-]+)?@)?"; // check hotsname or ip address $urlregex .= "[a-z0-9+\$_-]+(\.[a-z0-9+\$_-]+)*"; //$urlregex .= "[a-z0-9+\$_-]+(\.[a-z0-9+\$_-]+)+"; // http://x.x = minimum //$urlregex .= "([a-z0-9+\$_-]+\.)*[a-z0-9+\$_-]{2,3}"; // http://x.xx(x) = minimum //use only one of the above // check port address $urlregex .= "(\:[0-9]{2,5})?"; // check path $urlregex .= "(\/([a-z0-9+\$_-]\.?)+)*\/?"; // check query $urlregex .= "(\?[a-z+&\$_.-][a-z0-9;:@/&%=+\$_.-]*)?"; // check anchor $urlregex .= "(#[a-z_.-][a-z0-9+\$_.-]*)?\$"; // return results if (eregi($urlregex, $url)){ return "1"; }else{ return "0"; } }
Assine a newsletter para receber em seu email as publicações atualizadas neste blog