The request headers and $_SERVER contents are always absolutely identical!
Google AI tells me this works...
But it is utter nonsense. All the requests are 'document'!
There has GOT TO BE a way to distinguish the requests SURELY????
I am trying to record hits on a web page and I don't want to record all the requests for associated images, js files and css files etc as unique hits on index.php (or whatever).
Google AI tells me this works...
But it is utter nonsense. All the requests are 'document'!
There has GOT TO BE a way to distinguish the requests SURELY????
I am trying to record hits on a web page and I don't want to record all the requests for associated images, js files and css files etc as unique hits on index.php (or whatever).
Code:
$strDestination = $_SERVER["HTTP_SEC_FETCH_DEST"] ?? "";
if (in_array($strDestination, ["script", "style", "image", "font", "iframe"]))
{
PrintJavascriptLine("console.log('Request for image, script, style or font so page hit was not added to database...');", 1, true);
}
else if ($strDestination === "document")