Home Forums PHP Validate URL in PHP

Tagged: ,

This topic contains 0 replies, has 1 voice, and was last updated by  Usman Haider 3 years, 4 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #673

    Usman Haider
    Keymaster

    URL validation is widely used in PHP for checking if the user entered data is a valid url or not. In past, it was very difficult to match the url pattern with the user entered data by using regex techniques. But thanks to the PHP’s filter_var function which allows us to specify the type of data we want to match, and it will handle the rest of the work. This function returns true or false upon matching the required parameter. Here is its usage:

    Hope it will help 🙂

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.