filter var filter validate url

Solutions on MaxInterview for filter var filter validate url by the best coders in the world

showing results for - "filter var filter validate url"
Jacobo
23 Feb 2016
1<?php
2$url = "https://www.google.com";
3
4if (filter_var($url, FILTER_VALIDATE_URL)) {
5    echo("$url is a valid URL");
6} else {
7    echo("$url is not a valid URL");
8}