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
[HELP] How do you add " __ Users Online" to a r63/r63b habbo retro banner?
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="Mega" data-source="post: 222488" data-attributes="member: 29926"><p>[SPOILER]</p><p>[PHP]<?php</p><p>// Original code credit to Edward on *****</p><p> </p><p>// Caching addition by Ixel (http://retro-source.info)</p><p>// Do not remove these credits</p><p>if (file_exists("./cache_banner.png"))</p><p>{</p><p> $yesterday = strtotime('-1 minutes');</p><p> $i = filemtime("./cache_banner.png");</p><p> </p><p> if ($i < $yesterday)</p><p> {</p><p> @unlink("./cache_banner.png");</p><p> }</p><p> else</p><p> {</p><p> header("Content-type: image/png");</p><p> $img = imagecreatefrompng("./cache_banner.png");</p><p> imagepng($img);</p><p> imagedestroy($img);</p><p> die();</p><p> }</p><p>}</p><p>// End of caching check</p><p> </p><p>$dbhost = 'localhost';</p><p>$dbuser = 'Username';</p><p>$dbpass = 'Password';</p><p>$dbname = 'Database';</p><p> </p><p>$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');</p><p>mysql_select_db($dbname);</p><p> </p><p>$result = mysql_query("SELECT * FROM server_status");</p><p> </p><p>$row = mysql_fetch_array( $result );</p><p>$text = "Habbos Online";</p><p>$image = imagecreatefrompng('images/02.png');</p><p>$black = imagecolorallocate($image, 0, 0, 0);</p><p>imagefttext($image, 8, 0, 182, 80, $black, './verdanab.ttf', $row['users_online']);</p><p>// imagefttext($image, 8, 0, 182, 75, $black, './verdana.ttf', $text); // Remove the // ahead of this line to use it</p><p>header('Content-type: image/png');</p><p>imagepng($image);</p><p>imagepng($image, "./cache_banner.png");</p><p>imagedestroy($image);</p><p>?>[/PHP][/SPOILER]</p><p>Got it from somewhere which i forgot. But I hope this work.</p></blockquote><p></p>
[QUOTE="Mega, post: 222488, member: 29926"] [SPOILER] [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); ?>[/PHP][/SPOILER] Got it from somewhere which i forgot. But I hope this work. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[HELP] How do you add " __ Users Online" to a r63/r63b habbo retro banner?
Top