HenryGlazt

change.org

Apr 9th, 2019
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.24 KB | None | 0 0
  1. <?php
  2. class Adil
  3. {
  4.     /**
  5.      * @copyright: YarzCode
  6.      * Negeri ini butuh keadilan, bukan hanya kesejahteraan
  7.      *           #JusticeForAudrey
  8.      *           I'am Just a kids
  9.      */
  10.     public function support()
  11.     {
  12.         /**
  13.          * I know who I am, but by upholding justice is it wrong?
  14.          */
  15.         $banner =
  16.             "      Negeri ini butuh keadilan, bukan hanya kesejahteraan
  17.                   #JusticeForAudrey
  18.                   I'am Just a kids\n\n";
  19.         echo $banner;
  20.         echo "Amount to help? ";
  21.         $amount = trim(fgets(STDIN));
  22.         $i=0;
  23.         echo "\n";
  24.         while($i<$amount)
  25.         {
  26.             $check = $this->curl('http://yarzc0de.co.id/api/adil.php');
  27.             if(json_decode($check[1],1)['success'] == true)
  28.             {
  29.                 echo "Support telah ditambahkan, Nama: ".json_decode($check[1],1)['name']." | ID Pengguna: ".json_decode($check[1],1)['id']."\n";
  30.             } else {
  31.                 echo "Kesalahan tidak terduga pada sistem.\n";
  32.             }
  33.             $i++;
  34.         }
  35.     }
  36.  
  37.     private function curl($url, $post=false, $httpheader=false,$cookie=false)
  38.     {
  39.         $ch = curl_init();
  40.         curl_setopt($ch, CURLOPT_URL, $url);
  41.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  42.         curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  43.         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  44.         curl_setopt($ch, CURLOPT_HEADER, 1);
  45.         if($cookie !== false)
  46.         {
  47.             curl_setopt($ch, CURLOPT_COOKIE, $cookie);
  48.             curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
  49.         }
  50.         if($post != false)
  51.         {
  52.             curl_setopt($ch, CURLOPT_POST, true);
  53.             curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
  54.         }
  55.         if($httpheader != false)
  56.         {
  57.             curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
  58.             curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);
  59.         }
  60.         $response = curl_exec($ch);
  61.         $header = substr($response, 0, curl_getinfo($ch, CURLINFO_HEADER_SIZE));
  62.         $body = substr($response, curl_getinfo($ch, CURLINFO_HEADER_SIZE));
  63.         curl_close($ch);
  64.         return array($header, $body);
  65.     }
  66. }
  67. $a = new Adil();
  68. $a->support();
Advertisement
Add Comment
Please, Sign In to add comment