[HELP] How do you add " __ Users Online" to a r63/r63b habbo retro banner?

kier4n

Member
May 31, 2013
63
12
I've recently got into making retro banners and I was just wondering if anyone could help me with adding how many users the hotel has online to the banner.

I would appreciate any help.
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
You will need a PHP script that echoes out how many users are online, and then you need a PHPGD banner that will read the contents of that PHP script and then use imagettftext() to place it on the banner.
 

Mega

Posting Freak
Mar 23, 2013
858
155
PHP:
<?php
// Original code credit to Edward on *****
 
// Caching addition by Ixel (http://retro-source.info)
// Do not remove these credits
if (file_exists("./cache_banner.png"))
{
        $yesterday = strtotime('-1 minutes');
        $i = filemtime("./cache_banner.png");
 
        if ($i < $yesterday)
        {
                @unlink("./cache_banner.png");
        }
        else
        {
                header("Content-type: image/png");
                $img = imagecreatefrompng("./cache_banner.png");
                imagepng($img);
                imagedestroy($img);
                die();
        }
}
// End of caching check
 
$dbhost = 'localhost';
$dbuser = 'Username';
$dbpass = 'Password';
$dbname = 'Database';
 
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die                      ('Error connecting to mysql');
mysql_select_db($dbname);
 
$result = mysql_query("SELECT * FROM server_status");
 
$row = mysql_fetch_array( $result );
$text = "Habbos Online";
$image = imagecreatefrompng('images/02.png');
$black = imagecolorallocate($image, 0, 0, 0);
imagefttext($image, 8, 0, 182, 80, $black, './verdanab.ttf', $row['users_online']);
// imagefttext($image, 8, 0, 182, 75, $black, './verdana.ttf', $text); // Remove the // ahead of this line to use it
header('Content-type: image/png');
imagepng($image);
imagepng($image, "./cache_banner.png");
imagedestroy($image);
?>
Got it from somewhere which i forgot. But I hope this work.
 

Jakee

Member
Aug 23, 2011
208
19
Here, at a pack of mine, Re-Did the code so hopefully it should work with almost any database & hotel I Did this on RevCMS so definitely works on there. Happy to help, Information is all in there.
 

kier4n

Member
May 31, 2013
63
12
Here, at a pack of mine, Re-Did the code so hopefully it should work with almost any database & hotel I Did this on RevCMS so definitely works on there. Happy to help, Information is all in there.


Thanks but I have no idea where I put the code. I'm using Paint.NET software.
 

Users who are viewing this thread

Top