FILTER_VALIDATE_URL

Check whether the url is valid or not

Example
======

<?php
if(filter_var(“http://phpcodez.com”, FILTER_VALIDATE_URL)) {
echo “Valid URL”;
}else {
echo “Invalid URL”;
}
?>

Output
=====

Valid URL