Detaylı İnceleme
İyi çalışmalar.
<?
function urlkontrolet ($adres) {
$sonuc = ereg("^[a-zA-Z0-9]+://[^ ]+$", $adres);
if ($sonuc) { $dogru = "doğrudur."; } else { $dogru = "yanlıştır."; }
echo (" URL adresi : $adres $dogru <BR>");
}
urlkontrolet ("www.ME.com.tr");
urlkontrolet ("http://www.ME.com.tr/");
urlkontrolet ("http://ME.com. tr");
?>
Kodu çalıştırmak için ▶ butonuna tıklayın.