<?php
$url = "Нужный адрес";
if (preg_match('/^(http|https|ftp)://([A-Z0-9][A- Z0-9_-]*(?:.[A-Z0-9][A-Z0-9_-]*)+):?(d+)?/?/i' , $url)) {
echo "Your url is ok.";
} else {
echo "Wrong url.";
}
?>
<?php
$url = "Нужный адрес";
if (preg_match('/^(http|https|ftp)://([A-Z0-9][A- Z0-9_-]*(?:.[A-Z0-9][A-Z0-9_-]*)+):?(d+)?/?/i' , $url)) {
echo "Your url is ok.";
} else {
echo "Wrong url.";
}
?>