Code / PHP Snippets / HTTP Post Debugging

  1. <?
  2. // Quick and dirty way of writing HTTP Post results
  3. // into a text file for debugging.
  4. $fp = fopen('serverdata.txt', 'w');
  5. fwrite($fp, serialize($_SERVER));
  6. fclose($fp);
  7.  
  8. copy('php://input', 'logfile.txt');
  9. ?>

Download as Text : January 6th, 2009