Created
October 3, 2013 16:10
-
-
Save timelf123/6812410 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$DoNotTrackHeader = "DNT"; | |
$DoNotTrackValue = "1"; | |
$phpHeader = "HTTP_" . strtoupper(str_replace("-", "_", $DoNotTrackHeader)); | |
if((array_key_exists($phpHeader, $_SERVER)) and ($_SERVER[$phpHeader] == $DoNotTrackValue)) | |
{ | |
// Do Not Track is enabled | |
} | |
else | |
{ | |
// Do Not Track is not enabled | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://donottrack.us/cookbook/