article

Friday, July 29, 2016

URL Validation

URL Validation
1
2
3
4
5
6
7
$validation = filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED);
 
if ( $validation ) $output = 'proper URL';
else $output = 'wrong URL';
 
echo $output;

Related Post