0

Quick URL Validation in PHP

In this post I’ll how to quickly validate URL in php , In php there is pre defined function called filter_var. You can use this pre defined function to validate URL in only one line of code, That will help you to insert valid URL in your database quickly utilizing server side approval in PHP.

php check url exists, php check url valid, php filter validate url without http, php filter_sanitize_url, php filter_var, php validate url regex, php validate url without http, url validation in php preg_match

Here you just need to pass FILTER_VALIDATE_URL parameter in filter_var and It’ll validate URL/hostname/domain name quickly, See example below.

Leave a Reply

Your email address will not be published. Required fields are marked *