Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $dbhost = '127.0.0.1';
- $dbuser = 'root';
- $dbpass = '';
- $dbname = 'premieredb';
- $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to MySQL database, check details!');
- mysql_select_db($dbname);
- $result = mysql_query("SELECT count(*) FROM users WHERE online = '1'");
- $online = "Users Online!";
- $row = mysql_fetch_array( $result );
- $image = imagecreatefrompng('images/banner.png');
- $font_color = imagecolorallocate($image, 255, 0, 0);
- imagefttext($image, 20, 0, 417, 30, $font_color, './arial.ttf', $row;
- imagefttext($image, 8, 0, 398, 45, $font_color, './arial.ttf', $online);
- imagefttext($image, 20, 0, 394, 77, $font_color, './arial.ttf', $num_rows);
- header('Content-type: image/png');
- imagepng($image);
- imagedestroy($image);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement