Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Best way to check if a URL is valid


filter_var($url, FILTER_VALIDATE_URL);

if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) {
    die('Not a valid!!');
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Best #check #URL #valid
ADD COMMENT
Topic
Name
3+5 =