xxxxxxxxxx
<?php
// this is the most basic and most used way to validate a link in php
$url = "https://mrbean.dev";
if (filter_var($url, FILTER_VALIDATE_URL)) {
echo("$url is a valid URL");
} else {
echo("$url is not a valid URL");
}
?>