Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require ('config.php');
- if (isset($_GET['player']) && isset($_GET['img'])) {
- $user = $_GET['player'];
- $img = $_GET['img'];
- $watermark = "Made with dynsig basic";
- $im = imagecreatefrompng(getcwd() . '/images/signatures/' . $img);
- if (!$im) {
- die("");
- }
- $font = 'resources/font.ttf';
- $fontsize = 25;
- $color = imagecolorallocate($im, 255, 255, 255);
- $width = imagesx($im);
- $height = imagesy($im);
- imagettftext($im, $fontsize, 0, 70, 37, $color, $font, "IP: ".$server_ip);
- imagettftext($im, $fontsize, 0, 10, 77, $color, $font, "Player: ".$user);
- imagettftext($im, 8, 0, $width - 120, $height - 5, $color, $font, $watermark);
- Header('Content-type: image/png');
- imagepng($im);
- imagedestroy($im);
- }
- ?>
- <!DOCTYPE html>
- <html>
- <title>Choose your signature!</title>
- <body bgcolor="gray" background="images\back.png">
- <font color="white" size="4">
- <center>
- <form action = "index.php" method="GET">
- Minecraft Name: <input type="text" name="player" value = "Notch"/><br><br><br>
- <font color="white" size="5">
- <b>Click an image below to create your signature!</b><br><br><br>
- </font>
- <?php
- $numbers = array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0");
- if ($handle = opendir(getcwd() . '/images/signatures')) {
- while (false !== ($entry = readdir($handle))) {
- if ($entry != "." && $entry != "..") {
- $name = str_replace(".png", "", $entry);
- echo "\n<b>".str_replace($numbers, "", $name)."</b><br>\n";
- echo "<input type=\"image\" src=\"index.php?img=".$entry."&player=Notch\" name=\"img\" value=\"".$entry."\"/>\n<br><br>";
- }
- }
- closedir($handle);
- }
- ?>
- </form>
- </center>
- </font>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment