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
- $acc = '##NAME##';
- $base = mysql_connect ('127.0.0.1', 'GTI****', '*****');
- mysql_select_db ('***', $base);
- $sql = "SELECT name, balance FROM banking WHERE name = '$acc'";
- $req = mysql_query($sql);
- while($data = mysql_fetch_array($req)){
- $name = $data['name'];
- $cash = $data['balance'];
- // You can use any .tff font
- $font = './font.ttf';
- $pname = 'Name: '.$name;
- $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, 30, 0, 4, 30, $black, $font, "gti bank");
- imagettftext($im, 30, 0, 6, 31, $white, $font, "gti bank");
- // Name Test
- imagettftext($im, 18, 0, 115, 20, $black, $font, $pname);
- imagettftext($im, 18, 0, 117, 21, $white, $font, $pname);
- // Money Text
- imagettftext($im, 18, 0, 115, 47, $black, $font, $money);
- imagettftext($im, 18, 0, 117, 48, $white, $font, $money);
- // Some stuff
- imagepng($im);
- imagedestroy($im);
- }
- mysql_close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement