Created
January 14, 2014 09:09
-
-
Save getanwar/8415400 to your computer and use it in GitHub Desktop.
PHP: Link Validation Func
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Function for website address match found | |
function isLink($match_link) { | |
return(preg_match("/((?:https?\:\/\/|www\.)(?:[-a-z0-9]+\.)*[-a-z0-9]+.*)/i", $match_link)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment