Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- $dbhost = "216.245.219.172";
- $dbuser = "website";
- $dbpass = "xxxxxxxxxxxxxx";
- $dbname = "habplus_hotel";
- $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
- mysql_select_db($dbname);
- $query = 'SELECT COUNT(*) FROM `users` WHERE `online` > 1';
- $result = mysql_query($query) or die('Habplus = Offline ' . mysql_error());
- $numberofresults = mysql_result($result, 0);
- $result = mysql_query("SELECT * FROM server_status");
- $row = mysql_fetch_array( $result );
- $text = " ";
- $image = imagecreatefrompng('images/10.png');
- $black = imagecolorallocate($image, 0, 0, 0);
- imagefttext($image, 14, 0,190, 49, $black, './Ubuntu-B.ttf', $row['users_online']);
- // imagefttext($image, 10, 0, 182, 75, $black, './verdana.ttf', $text); // Remove the // ahead of this line to use it
- header('Content-type: image/png');
- imagepng($image);
- imagedestroy($image);
- ?>
Add Comment
Please, Sign In to add comment