Skip to content

Instantly share code, notes, and snippets.

@getanwar
Created January 14, 2014 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save getanwar/8415400 to your computer and use it in GitHub Desktop.
Save getanwar/8415400 to your computer and use it in GitHub Desktop.
PHP: Link Validation Func
// 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