Advertisement
Guest User

sada

a guest
Jun 16th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.53 KB | None | 0 0
  1. <?php
  2. include('http://apocalypsecheats.xyz/client3/login/db.php');
  3.  
  4. $action = $_GET['action'];
  5.  
  6. $username = $con->real_escape_string($_GET['username']);
  7. $password = $con->real_escape_string(md5($_GET['password']));
  8.  
  9.   define("CHUNK_SIZE", 1024*1024); // Size (in bytes) of tiles chunk
  10.  
  11.   // Read a file and display its content chunk by chunk
  12.   function readfile_chunked($filename, $retbytes = TRUE) {
  13.     $buffer = "";
  14.     $cnt =0;
  15.     // $handle = fopen($filename, "rb");
  16.     $handle = fopen($filename, "rb");
  17.     if ($handle === false) {
  18.       return false;
  19.     }
  20.     while (!feof($handle)) {
  21.       $buffer = fread($handle, CHUNK_SIZE);
  22.       echo $buffer;
  23.       ob_flush();
  24.       flush();
  25.       if ($retbytes) {
  26.         $cnt += strlen($buffer);
  27.       }
  28.     }
  29.     $status = fclose($handle);
  30.     if ($retbytes &amp;&amp; $status) {
  31.       return $cnt; // return num. bytes delivered like readfile() does.
  32.     }
  33.     return $status;
  34.   }
  35.  
  36. if(!$action)
  37. {
  38.   echo "Acces denied.";
  39. }
  40. else
  41. {
  42.   else if($action == "login6")
  43.   {
  44.     $query = $con->query("SELECT * FROM users WHERE username = '$username' and password = '$password'");
  45.     $cnt = $query->num_rows;
  46.    
  47.     if($cnt > 0)
  48.     {
  49.       $logged_in = 1;
  50.     }
  51.     else
  52.     {
  53.       $logged_in = 0;
  54.     }
  55.   }
  56.  
  57.  
  58.   if ($logged_in) {
  59.     $filename = "http://archive.apocalypsecheats.xyz/xdddddd/nice_bro";
  60.     $mimetype = "mime/type";
  61.     header("Content-Type: ".$mimetype );
  62.     readfile_chunked($filename);
  63.   }
  64.   else {
  65.     echo "Acces denied.";
  66.   }
  67. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement