PHP, jeśli URL zawiera
if(strpos($_SERVER['REQUEST_URI'], "string")) {
...
}
RedBredren
if(strpos($_SERVER['REQUEST_URI'], "string")) {
...
}
<?php
if(filter_var($imagePath, FILTER_VALIDATE_URL) === FALSE){
echo "Not valide URL";
}else{
echo "valide URL";
}
preg_match('/(http|ftp|mailto)/', $string, $matches);
var_dump($matches);