Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $capt = substr(md5(time()),0,4);
- $capt .= " " . substr(md5(time()),4,4);
- $im = imagecreatetruecolor(125, 45);
- $colour = imagecolorallocate($im, 255, 255, 255);
- imagefill($im, 0, 0, $colour);
- $text_colour1 = imagecolorallocate($im, 80, 80, 80);
- $text_colour = imagecolorallocate($im, 160, 160, 160);
- $line_colour = imagecolorallocate($im, rand(0, 100), rand(0, 100), rand(150, 255));
- $line_colour1 = imagecolorallocate($im, rand(0, 100), rand(0, 100), rand(150, 255));
- imagestring($im, 3, 30, 16, $capt, $text_colour);
- imagestring($im, 20, 23, 15, $capt, $text_colour1);
- imageline($im, rand(0, 45), rand(20, 45), rand(0, 145), rand(0, 45), $line_colour);
- imageline($im, rand(0, 45), rand(20, 45), rand(0, 145), rand(0, 45), $line_colour1);
- header('Content-Type: image/jpeg');
- imagejpeg($im, NULL, 100);
- imagedestroy($im);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment