Skip to content

Instantly share code, notes, and snippets.

@cagrimmett
Created June 6, 2018 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cagrimmett/b52d0baba51fbae6abbea9270f0f9ac7 to your computer and use it in GitHub Desktop.
Save cagrimmett/b52d0baba51fbae6abbea9270f0f9ac7 to your computer and use it in GitHub Desktop.
Get query string and check it.
<?php
$key = $_SERVER['QUERY_STRING'];
if ($key == 'RANDOM_TOKEN' ) {
echo "String matches!";
} else {
exit("You are not authorized. Go away.");
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment