SHARE
TWEET

Untitled

a guest Oct 3rd, 2017 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $host = "localhost";
  3. $user = "hidden";
  4. $pass = "hidden";
  5. $db = "hidden";
  6.  
  7. $con = mysql_connect($host, $user, $pass);
  8. mysql_select_db($db, $con);
  9.  
  10.     putenv('GDFONTPATH=' . realpath('.'));
  11.     $mcname = $_GET['name'];
  12.     $image = imagecreatefrompng("sigbg.png");
  13.     $lightstone = imagecreatefrompng("Lightstone.png");
  14.     $netherrack = imagecreatefrompng("Netherrack.png");
  15.     $font = "minecraft";
  16.     $black = imagecolorallocate($image,0,0,0);
  17.     $darkblue = imagecolorallocate($image,0,0,191);
  18.     $darkgreen = imagecolorallocate($image,0,191,0);
  19.     $darkteal = imagecolorallocate($image,0,191,191);
  20.     $darkred = imagecolorallocate($image,191,0,0);
  21.     $purple = imagecolorallocate($image,191,0,191);
  22.     $gold = imagecolorallocate($image,191,191,0);
  23.     $blue = imagecolorallocate($image,64,64,255);
  24.     $brightgreen = imagecolorallocate($image,64,255,64);
  25.     $teal = imagecolorallocate($image,0,0,0);
  26.     $red = imagecolorallocate($image,255,64,64);
  27.     $pink = imagecolorallocate($image,255,64,255);
  28.     $yello = imagecolorallocate($image,255,255,64);
  29.     $black = imagecolorallocate($image,255,255,255);
  30.     imagealphablending($image, true);
  31.  
  32.    
  33.     $result = mysql_query("SELECT online FROM players WHERE player_name='".$mcname."'");
  34.     $row = mysql_fetch_assoc($result);
  35.     $online = $row['online'];
  36.     $distance = $row['distance_travelled'];
  37.     if($distance > 1000){
  38.         $distancefinal = $distance/1000 . "km";
  39.     }else{
  40.         $distancefinal = $distance . "m";
  41.     }
  42.     if($online == "Y"){
  43.         $src = $lightstone;
  44.     }else{
  45.         $src = $netherrack;
  46.     }
  47.    
  48.     imagecopy($image, $src, 337, 5, 0, 0, 50, 50);
  49.     //right here
  50.     imagettftext($image, 6, 0, 15, 7, $brightgreen, "minecraft.ttf", "Test");
  51.     header("Content-type: image/png");
  52.     imagepng($image);
  53. mysql_close($con);
  54. imagedestroy($image);
  55. imagedestroy($lightstone);
  56. imagedestroy($netherrack);
  57. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top