Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!isset($_GET['t']) || empty($_GET['t'])) $text = "No input given";
- elseif($_GET['t'] == "_IP_") $text = $_SERVER['REMOTE_ADDR'];
- elseif(substr($_GET['t'], 0, 9) == "_IPSTART_") $text = $_SERVER['REMOTE_ADDR'] . substr($_GET['t'], 9);
- elseif(substr($_GET['t'], 0, 7) == "_IPEND_") $text = substr($_GET['t'], 7) . $_SERVER['REMOTE_ADDR'];
- elseif($_GET['t'] == "_JOINSERVER_") $text = "Come join us: " . $_SERVER['REMOTE_ADDR'] . ":7777";
- else $text = $_GET['t'];
- if($_GET['c'] && !empty($_GET['c']))
- {
- $c = $_GET['c'];
- $activate_c = true;
- }
- if($_GET['b'] && !empty($_GET['b']))
- {
- $b = $_GET['b'];
- $activate_b = true;
- }
- $image = imagecreate((strlen($text) * 7) + 5, 20);
- if($b >= 0 && $b <= 8 && $activate_b)
- {
- if($b == 0) $bgcol = imagecolorallocate($image, 255, 255, 255);
- elseif($b == 1) $bgcol = imagecolorallocate($image, 255, 0, 0);
- elseif($b == 2) $bgcol = imagecolorallocate($image, 0, 255, 0);
- elseif($b == 3) $bgcol = imagecolorallocate($image, 0, 0, 255);
- elseif($b == 4) $bgcol = imagecolorallocate($image, 100, 100, 255);
- elseif($b == 5) $bgcol = imagecolorallocate($image, 175, 175, 175);
- elseif($b == 6) $bgcol = imagecolorallocate($image, 255, 255, 0);
- elseif($b == 7) $bgcol = imagecolorallocate($image, 0, 255, 255);
- elseif($b == 8) $bgcol = imagecolorallocate($image, 0, 0, 0);
- }
- else $bgcol = imagecolorallocate($image, 0, 0, 0);
- if(!isset($_GET['t']) || empty($_GET['t'])) $txcol = imagecolorallocate($image, 255, 0, 0);
- if($c >= 0 && $c <= 8 && $activate_c)
- {
- if($c == 0) $txcol = imagecolorallocate($image, 255, 255, 255);
- elseif($c == 1) $txcol = imagecolorallocate($image, 255, 0, 0);
- elseif($c == 2) $txcol = imagecolorallocate($image, 0, 255, 0);
- elseif($c == 3) $txcol = imagecolorallocate($image, 0, 0, 255);
- elseif($c == 4) $txcol = imagecolorallocate($image, 100, 100, 255);
- elseif($c == 5) $txcol = imagecolorallocate($image, 175, 175, 175);
- elseif($c == 6) $txcol = imagecolorallocate($image, 255, 255, 0);
- elseif($c == 7) $txcol = imagecolorallocate($image, 0, 255, 255);
- elseif($c == 8) $txcol = imagecolorallocate($image, 0, 0, 0);
- }
- else $txcol = imagecolorallocate($image, 255, 255, 255);
- imagestring($image, 3, 3, 4, $text, $txcol);
- imagesetthickness($image, 5);
- header("content-type: image/png");
- imagepng($image);
- imagecolordeallocate($txcol);
- imagecolordeallocate($bgcol);
- imagedestroy($image);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement