Advertisement
deseven

sendPOST.php

May 6th, 2015
584
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. <?php
  2.  
  3. if (isset($_POST["log"])) {
  4.     if (!is_dir("logs")) { mkdir("logs"); }
  5.     $filename = "logs/".date("d.m.Y-H.i.s-").$_SERVER["REMOTE_ADDR"].".log";
  6.     $data = explode("|",$_POST["log"]);
  7.     $data = implode("\n",$data);
  8.     file_put_contents($filename,$data,FILE_APPEND|LOCK_EX);
  9. }
  10.  
  11. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement