Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (!defined('STDIN'))
- {
- echo 'Please run it as a cmd ({path to your php}/php.exe {path to badges.php} -f)';
- exit;
- }
- define('BASE', 'http://images.habbo.com/c_images/album1584/');
- $countries = array('nl','us','fr','it','fi','no','se','dk','es');
- $flash_texts = array();
- echo 'Begin.....'."\r\n";
- foreach ($countries as $country)
- {
- $flash_texts[] = file_get_contents('http://hotel-'.$country.'.habbo.com/gamedata/external_flash_texts/0');
- echo 'Download flash_texts from country: '.$country."\r\n";
- }
- echo 'Everything is downloaded, Begin searching.....'."\r\n";
- foreach ($flash_texts as $key => $text)
- {
- echo 'Searching: '.$countries[$key]."\r\n";
- sleep(1);
- $pos = 0;
- while ($pos = strpos($text, 'badge_name_', $pos + 11))
- {
- $pos1 = strpos($text, '=', $pos);
- $badge = substr($text, $pos, ($pos1 -$pos));
- $badge = str_replace(array('badge_name_', '=', 'fb_'), '', $badge);
- if (is_int(strpos($badge, '.')))
- {
- continue;
- }
- if (file_exists('C:/badges/'.$badge.'.gif'))
- {
- echo 'badge exists: '.$badge."\r\n";
- continue;
- }
- echo 'Download badge: '.$badge."\r\n";
- if (!@copy(BASE.$badge.'.gif', 'C:/badges/'.$badge.'.gif'))
- {
- echo 'Error downloading: '.$badge."\r\n";
- }
- }
- }
- /*How it works:
- 1. Make a folder on your C drive named `badges`.
- 2. Save this script as badges.php where you like
- 3. Run CMD en type: {path to your php}/php.exe {path to badges.php} -f
- 4. Let PHP do his work x] (Errors with `file not found` can you ignore)
- */
- ?>
Advertisement
Add Comment
Please, Sign In to add comment