Return to Snippet

Revision: 18872
at October 11, 2009 10:10 by jnbn


Initial Code
$url = "http://komunitasweb.com/";
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.";
}

Initial URL


Initial Description


Initial Title
Validate Domain Name

Initial Tags


Initial Language
PHP