Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Can anyone make this script / php to display 6 images only?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Zephyrus" data-source="post: 297025" data-attributes="member: 7495"><p>Hey guys, i found a script that displays every badge that habbo is in their database, but one thing...I want it to only display 6 images, which I can't do as I havent really worked with PHP!!</p><p></p><p></p><p>Please help me make this only display 6 images! Thanks!</p><p>SCRIPT:</p><p></p><p></p><p><?php</p><p>$url = "<a href="http://xeonhotel.co.uk/r63/external_flash_texts.txt" target="_blank">http://xeonhotel.co.uk/r63/external_flash_texts.txt</a>"; // you can change habbo.com to other hotels</p><p>$data = file_get_contents($url);</p><p>$newlines = array("\n" ,"\r", "\r\n", ">", "<", "/");</p><p>$content = str_replace($newlines, "", html_entity_decode($data));</p><p></p><p>$Statushtml= '/badge_desc_(.+?)=/';</p><p>preg_match_all($Statushtml,$content,$Statusraw);</p><p>$badges = implode("-", $Statusraw[0]);</p><p>$badgevar = explode("=-badge_desc_", $badges);</p><p>$number = ($badgevar);</p><p>$badgevar2 = str_replace("=","",$badgevar);</p><p>$badgevar3 = str_replace("badge_desc_","",$badgevar2);</p><p>$number = count($badgevar3);</p><p>while ($number != 3) { </p><p></p><p>$number = $number - 1; </p><p></p><p>$imageUrl = "<a href="http://game.habboon.com/c_images/album1584/$badgevar3[$number].gif" target="_blank">http://game.habboon.com/c_images/album1584/$badgevar3[$number].gif</a>"; // if you did change habbo.com, you'd have to change it here too.</p><p></p><p>if(file_exists('images/badges/' . $badgevar3[$number] . '.gif'))</p><p>{</p><p>// removed the echo failure line line</p><p>} else {</p><p>echo '<div style="float:left; background:url(' . $imageUrl . '); height:50px; width:10%; background-repeat:no-repeat; background-position:center center;"></div>'; // changed this echo to display the image.</p><p>}</p><p>}</p><p></p><p>?></p></blockquote><p></p>
[QUOTE="Zephyrus, post: 297025, member: 7495"] Hey guys, i found a script that displays every badge that habbo is in their database, but one thing...I want it to only display 6 images, which I can't do as I havent really worked with PHP!! Please help me make this only display 6 images! Thanks! SCRIPT: <?php $url = "[URL]http://xeonhotel.co.uk/r63/external_flash_texts.txt[/URL]"; // you can change habbo.com to other hotels $data = file_get_contents($url); $newlines = array("\n" ,"\r", "\r\n", ">", "<", "/"); $content = str_replace($newlines, "", html_entity_decode($data)); $Statushtml= '/badge_desc_(.+?)=/'; preg_match_all($Statushtml,$content,$Statusraw); $badges = implode("-", $Statusraw[0]); $badgevar = explode("=-badge_desc_", $badges); $number = ($badgevar); $badgevar2 = str_replace("=","",$badgevar); $badgevar3 = str_replace("badge_desc_","",$badgevar2); $number = count($badgevar3); while ($number != 3) { $number = $number - 1; $imageUrl = "[URL]http://game.habboon.com/c_images/album1584/$badgevar3[$number].gif[/URL]"; // if you did change habbo.com, you'd have to change it here too. if(file_exists('images/badges/' . $badgevar3[$number] . '.gif')) { // removed the echo failure line line } else { echo '<div style="float:left; background:url(' . $imageUrl . '); height:50px; width:10%; background-repeat:no-repeat; background-position:center center;"></div>'; // changed this echo to display the image. } } ?> [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Can anyone make this script / php to display 6 images only?
Top