Adilol

Jos's ripper

Oct 18th, 2011
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.91 KB | None | 0 0
  1. <?php
  2.     if (!defined('STDIN'))
  3.     {
  4.         echo 'Please run it as a cmd ({path to your php}/php.exe {path to badges.php} -f)';
  5.         exit;
  6.     }
  7.  
  8.     define('BASE', 'http://images.habbo.com/c_images/album1584/');
  9.  
  10.     $countries = array('nl','us','fr','it','fi','no','se','dk','es');
  11.     $flash_texts = array();
  12.    
  13.     echo 'Begin.....'."\r\n";
  14.    
  15.     foreach ($countries as $country)
  16.     {    
  17.         $flash_texts[] = file_get_contents('http://hotel-'.$country.'.habbo.com/gamedata/external_flash_texts/0');
  18.         echo 'Download flash_texts from country: '.$country."\r\n";
  19.     }
  20.    
  21.     echo 'Everything is downloaded, Begin searching.....'."\r\n";
  22.    
  23.     foreach ($flash_texts as $key => $text)
  24.     {
  25.         echo 'Searching: '.$countries[$key]."\r\n";
  26.         sleep(1);
  27.        
  28.         $pos = 0;
  29.         while ($pos = strpos($text, 'badge_name_', $pos + 11))
  30.         {            
  31.             $pos1 = strpos($text, '=', $pos);
  32.             $badge = substr($text, $pos, ($pos1 -$pos));
  33.             $badge = str_replace(array('badge_name_', '=', 'fb_'), '', $badge);
  34.            
  35.             if (is_int(strpos($badge, '.')))
  36.             {
  37.                 continue;
  38.             }
  39.            
  40.             if (file_exists('C:/badges/'.$badge.'.gif'))
  41.             {
  42.                 echo 'badge exists: '.$badge."\r\n";
  43.                 continue;
  44.             }
  45.            
  46.             echo 'Download badge: '.$badge."\r\n";
  47.             if (!@copy(BASE.$badge.'.gif', 'C:/badges/'.$badge.'.gif'))
  48.             {
  49.                 echo 'Error downloading: '.$badge."\r\n";                
  50.             }  
  51.         }
  52.     }
  53. /*How it works:
  54. 1. Make a folder on your C drive named `badges`.
  55. 2. Save this script as badges.php where you like
  56. 3. Run CMD en type: {path to your php}/php.exe {path to badges.php} -f
  57. 4. Let PHP do his work x] (Errors with `file not found` can you ignore)
  58. */
  59. ?>
  60.  
Advertisement
Add Comment
Please, Sign In to add comment