Home Forums PHP Validate URL in PHP

Tagged: ,

Viewing 1 post (of 1 total)
  • Author
  • #673
    Usman Haider

    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.