filter validate url _ code example
Example: filter_var filter_validate_url
<?php
$url = "https://www.google.com";
if (filter_var($url, FILTER_VALIDATE_URL)) {
echo("$url is a valid URL");
} else {
echo("$url is not a valid URL");
}
<?php
$url = "https://www.google.com";
if (filter_var($url, FILTER_VALIDATE_URL)) {
echo("$url is a valid URL");
} else {
echo("$url is not a valid URL");
}