Source Code:
(back to article)
<?php $url = "https://www.example.com"; if (!filter_var($url, FILTER_VALIDATE_URL)) { echo "Invalid URL format"; } else { echo "Valid URL format"; } ?>
Result:
Report an issue