Can anyone make this script / php to display 6 images only?

Zephyrus

Wanderer
Sep 28, 2011
336
21
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 = " "; // 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 = " "; // 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.
}
}

?>
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
Interesting your Devbest name is "HabboDeveloper" and yet you can't even code PHP/HTML .. Irony here:

Well the main problem with your code here, is its retrieving all the information from the external flash texts, I don't think this was what you were looking for. This is more for housekeeping to display all the badges you have on your hotel. I think the thing you want would be to get 6 random badges from the player who is looking at the site.
 

Zephyrus

Wanderer
Sep 28, 2011
336
21
Interesting your Devbest name is "HabboDeveloper" and yet you can't even code PHP/HTML .. Irony here:

Well the main problem with your code here, is its retrieving all the information from the external flash texts, I don't think this was what you were looking for. This is more for housekeeping to display all the badges you have on your hotel. I think the thing you want would be to get 6 random badges from the player who is looking at the site.
You're clearly an dumbass, it is not sent from the housekeeping, it picks up the images and the files that are displayed in the habbo badges folder, and displays them...and by the way, I code html not php, so I don't see what your talking about there... hm what??
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
You're obviously the dumb ass seeming you did not READ what i fucking said..
I clearly said this code is USED for housekeeping to SEE ALL THE BADGES your hotel HAS. I said what you are probably looking for is something to display the USERS badges that s/he HAS.
 

Zephyrus

Wanderer
Sep 28, 2011
336
21
You're obviously the dumb ass seeming you did not READ what i fucking said..
I clearly said this code is USED for housekeeping to SEE ALL THE BADGES your hotel HAS. I said what you are probably looking for is something to display the USERS badges that s/he HAS.
Lolno, its not mean to display what he/she has...this was made for a fansite and it displays EVERY BADGE IN THE HOTEL, and still works to this date...it doesn't need the texts to work it, those are just there incase we plan to display the name of the badge! I was looking for it to display atleast 6 badges, not the whole badge folder...so your the dumb one here mate.
 

Vanish

Rising Java Developer
Dec 8, 2013
630
94
You're clearly an dumbass, it is not sent from the housekeeping, it picks up the images and the files that are displayed in the habbo badges folder, and displays them...and by the way, I code html not php, so I don't see what your talking about there... hm what??
You just called @JayCustom , the smartest habbo geek on here (Ofcourse Sledmore is first, JayCustom is second) a dumbass. What he said was obviously right lad, And to code a cms u don't need HTML, lol "HabboDeveloper" you actually need Html and PHP and Some MySQL G'day m8.
 

Users who are viewing this thread

Top