Advertisement
xpppppppaicyber

xcscreener

Oct 27th, 2024
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.82 KB | None | 0 0
  1. function landLoop() {
  2.     $multiHandle = curl_multi_init();
  3.     $curlHandles = [];
  4.     $results = [];
  5.  
  6.     for ($i = 2001; $i < 3000; $i++) {
  7.         $url = "https://pixels-server.pixels.xyz/v1/infiniportal/farm_details/pixelsNFTFarm-$i";
  8.         $curlHandles[$i] = curl_init($url);
  9.        
  10.         curl_setopt($curlHandles[$i], CURLOPT_RETURNTRANSFER, true);
  11.         curl_multi_add_handle($multiHandle, $curlHandles[$i]);
  12.     }
  13.  
  14.     $active = null;
  15.     do {
  16.         $status = curl_multi_exec($multiHandle, $active);
  17.         if ($active) {
  18.             curl_multi_select($multiHandle);
  19.         }
  20.     } while ($active && $status == CURLM_OK);
  21.  
  22.     foreach ($curlHandles as $i => $ch) {
  23.         $response = curl_multi_getcontent($ch);
  24.         $results[$i] = json_decode($response, true);
  25.         curl_multi_remove_handle($multiHandle, $ch);
  26.         curl_close($ch);
  27.     }
  28.  
  29.     curl_multi_close($multiHandle);
  30.  
  31.     foreach ($results as $i => $data) {
  32.         if ($data) {
  33.             $soil = $data['soilCount'];
  34.             $tree = $data['treeCount'];
  35.             $entities = $data['entities'];
  36.             $permission = $data['permissions']['use'][0];
  37.             $ent = [];
  38.    
  39.     foreach($entities as $key => $value){
  40.         $ent[] = $value['id'];
  41.     }
  42.  
  43.     $countArray = [];
  44.  
  45.     foreach ($ent as $id) {
  46.         if (isset($countArray[$id])) {
  47.             $countArray[$id]++;
  48.         } else {
  49.             $countArray[$id] = 1;
  50.         }
  51.     }
  52.  
  53.     $industrys = "";
  54.     foreach ($countArray as $id => $count) {
  55.         $industrys .= $id . " : " . $count . "\n";
  56.     }
  57.  
  58.             if ($permission == "ANY" && str_contains($industrys, "ent_apiary")) {
  59.                 echo "XC Screener : $i | Soil : $soil | Tree : $tree\n$industrys\n\n";
  60.             }
  61.         } else {
  62.            
  63.         }
  64.     }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement