Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_GET['v']) && extension_loaded('gd') && function_exists('gd_info')){
- $string = $_GET['v'];
- $font_size = 4;
- $width = imagefontwidth($font_size)*strlen($string);
- $height = imagefontheight($font_size);
- $img = imagecreate($width,$height);
- $bg = imagecolorallocate($img, 25, 25, 25);
- $color = imagecolorallocate($img, 255, 255, 255);
- $len = strlen($string);
- $ypos = 0;
- for($i=0;$i<$len;$i++){
- $xpos = $i * imagefontwidth($font_size);
- imagechar($img, $font_size, $xpos, $ypos, $string, $color);
- $string = substr($string, 1);
- }
- header("Content-Type: image/png");
- imagepng($img);
- imagedestroy($img);
- }
- ?>
Add Comment
Please, Sign In to add comment