John Davidson

php - $_SERVER[HTTP_REFERER] Doesn't Work With HTTP Url Work Only With HTTPS

0 comments
Message:


When My Web Site Is https://example.com The Function Works Properly And When i Use http://example.com It Doesn't Work


Here My Code :


<?php

$adfly = "exey.io";

$flink = $_SERVER['HTTP_REFERER'];

$host = parse_url($flink);

if (isset($host['host']) && $host['host'] == $adfly) {
echo "True". '<br>';
}
else {
echo "False" . '<br>';
}

?>


My Answer:
't always provide accurate information about the referring page. It can be easily manipulated or spoofed by the user or browser settings. It is not a reliable method for tracking or verifying the source of a request.

Rate this post

5 of 5 based on 4234 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us