Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // The script is created by Jarno Sulmann (a.k.a Pilovali/pity123)
- // Contact: jarnosulmann@gmail.com
- // All rights reserved. Created on: 1-5-2014
- // if the image won't load proper, put a // before the header to show the error
- header ("Content-type: image/png");
- // Turn off error reporting, so the fucking script does not show notices
- error_reporting(0);
- // Image create shit
- $imgname = "background.png";
- $im = @imagecreatefrompng ($imgname);
- // Create some colors
- $white = imagecolorallocate($im, 255, 255, 255);
- $grey = imagecolorallocate($im, 128, 128, 128);
- $black = imagecolorallocate($im, 0, 0, 0);
- // MySQL
- $base = mysql_connect ('127.0.0.1', 'u247734055_***', '*******');
- mysql_select_db ('u247734055_***', $base);
- $sql = 'SELECT * FROM accounts';
- $req = mysql_query($sql);
- while($data = mysql_fetch_array($req)){
- $playername = $data['player'];
- $cash = $data['cash'];
- // You can use any .tff font
- $font = './font.ttf';
- //$cash = 5000;
- $money = 'Money: $'.number_format($cash);
- // The text here, there are 2 one is for shadow.
- // imagettftext(image, font size, angle, x, y, color, font, "text");
- imagettftext($im, 24, 0, 4, 22, $black, $font, "gti");
- imagettftext($im, 24, 0, 6, 22, $white, $font, "gti");
- imagettftext($im, 18, 0, 175, 32, $black, $font, $money);
- imagettftext($im, 18, 0, 177, 32, $white, $font, $money);
- // Some stuff
- imagepng($im);
- imagedestroy($im);
- mysql_close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement