Return to Snippet

Revision: 34598
at October 26, 2010 02:58 by newsok


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