Created
June 12, 2014 11:32
-
-
Save saihtaM/19ae42ab8e553bcfefb9 to your computer and use it in GitHub Desktop.
Quick PHP debugging when you want to know what an API or whatever sends to you. And some other stuff.
This file contains hidden or 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 | |
// Remember to delete the emails, if you are not planning on removing some of the arrays below. | |
$message = "Results HEADER:\n" . print_r( getallheaders(), true ); | |
$message .= "Results SERVER:\n" . print_r( $_SERVER, true ); | |
$message .= "Results GET:\n" . print_r( $_GET, true ); | |
$message .= "Results POST:\n" . print_r( $_POST, true ); | |
$message .= "Results COOKIEs:\n" . print_r( $_COOKIE, true ); | |
$message .= "Results SESSION:\n" . print_r( $_SESSION, true ); | |
$message .= "Results FILES:\n" . print_r( $_FILES, true ); | |
mail("[email protected]","Incoming.php stuff",$message); // You should obviously not use a server that has a spam filter. As it will be bad if it reports your webserver as a spammer. | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment