Skip to content

Instantly share code, notes, and snippets.

@binarykore
Last active May 24, 2022 06:11
Show Gist options
  • Select an option

  • Save binarykore/7d7abcf972938fbfdf515cf47fa820d2 to your computer and use it in GitHub Desktop.

Select an option

Save binarykore/7d7abcf972938fbfdf515cf47fa820d2 to your computer and use it in GitHub Desktop.
Needle in a Haystack of Arrays for Vercel..
<?php
function haystack(){
$_hash = [];
foreach(array_keys($_REQUEST) as $_token => $_coin){
$_hash[$_token] = (array_keys($_REQUEST)[$_token]);
$_hash[$_coin] = ($_REQUEST[array_keys($_REQUEST)[$_token]]);
}
return($_hash);
}//
function payload($_parameter,$_url){
if(!empty(haystack()[$_parameter]) && !empty($_SERVER["QUERY_STRING"])){
exit(Header("Location:".($_url)));
}else{
}//
}//
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment