Facebook
From Voluminous Gorilla, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 136
  1. <?php
  2. require __DIR__ . '/class/vendor/autoload.php';
  3. \InstagramAPI\Instagram::$allowDangerousWebUsageAtMyOwnRisk = true;
  4.  
  5. /**
  6.  * [arama açıklaması]
  7.  * @param  [type] $kuadi [kullanıcı adı]
  8.  * @param  [type] $sifre [şifre]
  9.  */
  10.  
  11. function search($kuadi, $sifre){
  12.     $ig = new \InstagramAPI\Instagram();
  13.      try{
  14.          $login = $ig->login($kuadi,$sifre);
  15.          $array = explode("\n", file_get_contents('./ara.txt'));  
  16.          $rand = $array[mt_rand(0, count($array) - 1)];
  17.          $userId = $ig->people->getUserIdForName($rand);  
  18.          $rankToken = \InstagramAPI\Signatures::generateUUID();  
  19.          $followers = $ig->people->getFollowers($userId, $rankToken, $searchQuery = null, $maxId = null);  
  20.          $allcount = count($followers->getUsers());  
  21.          foreach($followers->getUsers() as $follower)
  22.            {
  23.             $search = $ig->people->getInfoByName($follower->getUsername(),$module = null);
  24.             $username = $follower->getUsername();        
  25.             if($search->getUser()->getFollowerCount() >= 2000){
  26.               $file = fopen("./ara.txt", "aw");
  27.               fwrite($file, $username. "\n");
  28.               fclose($file);
  29.             if($mail = $search->getUser()->getPublicEmail()){
  30.               echo "$username $mail <br>";
  31.              if(!$mail == ""){
  32.                $folder = fopen("./mail.txt", "a++");
  33.                fwrite($folder, "$username $mail\n");
  34.                fclose($folder);              
  35.                sleep(2);
  36.               }
  37.              }  
  38.             }
  39.           }
  40.        }catch (\Exception $e) {
  41.          die('Bir hata oluştu: ' . $e->getMessage());
  42.            }
  43.           }
  44.         search("otonobulucu", "merhabaaq");
  45.