<html>
<body>
// Variable to check
$url = "../index.html";
// Validate url
if (!filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_QUERY_REQUIRED) === false) {
echo("$url is a valid URL with a query string");
} else {
echo("$url is not a valid URL with a query string");
}
</body>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_filter_adv3 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:50:47 GMT -->
</html>