- Joined
- Nov 24, 2008
- Messages
- 2,528
- Reaction score
- 1,435
Hello... there was a person who made a service for this, and refused to provide the source code... so being myself, I went and found a tutorial and made my own!
You need to put that in a .php file, it can be called anything... change "http://www.blazehotel.ino/online.cfm" to the link to your user online script, and then you need to change "template.png" to a link which contains your background for the banner... as you will see at
Good day to you, sir(s)!
If you get a white screen, Kryptos provided a fix on page 4! Thanks Kryptos!
PHP:
<?php
header('Content-type: image/png');
$onlineurl = file_get_contents('http://www.blazehotel.info/online.cfm'); // Users online file ****? lol
$font = 'arial.ttf';
$handle = imagecreatefrompng('template.png'); // Background Image
$bg_color = ImageColorAllocate ($handle, 135, 206, 250);
$txt_color = ImageColorAllocate ($handle, 239, 244, 241);
imagettftext($handle, 12, 0, 130, 16, $txt_color, $font, "$onlineurl Users Online!");
ImagePng ($handle);
?>
You need to put that in a .php file, it can be called anything... change "http://www.blazehotel.ino/online.cfm" to the link to your user online script, and then you need to change "template.png" to a link which contains your background for the banner... as you will see at
To view the content, you need to sign in or register
, I have created a small black box where the users online goes.. and with the script it looks like
To view the content, you need to sign in or register
- Job done. I will offer absolutely NO support for this! If you know how to configure / use it, good, if not, I don't care!Good day to you, sir(s)!
If you get a white screen, Kryptos provided a fix on page 4! Thanks Kryptos!
PHP:
<?php
header('Content-type: image/png');
$onlineurl = file_get_contents('http://www.blazehotel.info/online.cfm'); // Users online file ****? lol
$font = 'Espar_Arial_Classic.ttf'; //Use your own
$handle = imagecreatefrompng('banner.png'); // Background Image
$bg_color = imagecolorallocate ($handle, 135, 206, 250);
$txt_color = imagecolorallocate ($handle, 239, 244, 241);
imagettftext($handle, 12, 0, 130, 16, $txt_color, $font, "$onlineurl Users Online!");
imagepng ($handle);
imagedestroy($handle);
?>
Last edited:

