Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "localhost";
- $user = "hidden";
- $pass = "hidden";
- $db = "hidden";
- $con = mysql_connect($host, $user, $pass);
- mysql_select_db($db, $con);
- putenv('GDFONTPATH=' . realpath('.'));
- $mcname = $_GET['name'];
- $image = imagecreatefrompng("sigbg.png");
- $lightstone = imagecreatefrompng("Lightstone.png");
- $netherrack = imagecreatefrompng("Netherrack.png");
- $font = "minecraft";
- $black = imagecolorallocate($image,0,0,0);
- $darkblue = imagecolorallocate($image,0,0,191);
- $darkgreen = imagecolorallocate($image,0,191,0);
- $darkteal = imagecolorallocate($image,0,191,191);
- $darkred = imagecolorallocate($image,191,0,0);
- $purple = imagecolorallocate($image,191,0,191);
- $gold = imagecolorallocate($image,191,191,0);
- $blue = imagecolorallocate($image,64,64,255);
- $brightgreen = imagecolorallocate($image,64,255,64);
- $teal = imagecolorallocate($image,0,0,0);
- $red = imagecolorallocate($image,255,64,64);
- $pink = imagecolorallocate($image,255,64,255);
- $yello = imagecolorallocate($image,255,255,64);
- $black = imagecolorallocate($image,255,255,255);
- imagealphablending($image, true);
- $result = mysql_query("SELECT online FROM players WHERE player_name='".$mcname."'");
- $row = mysql_fetch_assoc($result);
- $online = $row['online'];
- $distance = $row['distance_travelled'];
- if($distance > 1000){
- $distancefinal = $distance/1000 . "km";
- }else{
- $distancefinal = $distance . "m";
- }
- if($online == "Y"){
- $src = $lightstone;
- }else{
- $src = $netherrack;
- }
- imagecopy($image, $src, 337, 5, 0, 0, 50, 50);
- //right here
- imagettftext($image, 6, 0, 15, 7, $brightgreen, "minecraft.ttf", "Test");
- header("Content-type: image/png");
- imagepng($image);
- mysql_close($con);
- imagedestroy($image);
- imagedestroy($lightstone);
- imagedestroy($netherrack);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement