@ 2013-10-28T02:44:47Z <?php
$font_size = 30;
$image_width = 100;
$image_height = 40;
$image = imagecreate($image_width, $image_height);
imagecolorallocate($image, 226, 226, 226);
$font_color = imagecolorallocate($image, 255, 0, 0);
$line_color = imagecolorallocate($image, 0, 0, 0);
for ($i=0; $i <40 ; $i++) {
$x1 = rand(1, 100);
$y1 = rand(1, 100);
$x2 = rand(1, 100);
$y2 = rand(1, 100);
imageline($image, $x1, $y1, $x2, $y2, $line_color);
}
imagettftext($image, $font_size, 0, 10, 30, $font_color, 'font/captcha_font.ttf', $text);
// imagestring($image, 4, 20, 10, $text, $font_color);
imagejpeg($image);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.0.0 - 7.0.20 , 7.1.0 - 7.1.7 , 7.2.0 Fatal error: Uncaught Error: Call to undefined function imagecreate() in /in/Y0WQg:6
Stack trace:
#0 {main}
thrown in /in/Y0WQg on line 6
Process exited with code 255 . Output for 5.0.0 - 5.0.5 , 5.1.0 - 5.1.6 , 5.2.0 - 5.2.17 , 5.3.0 - 5.3.29 , 5.4.0 - 5.4.45 , 5.5.0 - 5.5.38 , 5.6.0 - 5.6.28 Fatal error: Call to undefined function imagecreate() in /in/Y0WQg on line 6
Process exited with code 255 . Output for 4.4.5 - 4.4.9 Fatal error: Call to undefined function: imagecreate() in /in/Y0WQg on line 6
Process exited with code 255 . Output for 4.3.2 - 4.3.11 , 4.4.0 - 4.4.4 Fatal error: Call to undefined function: imagecreate() in /in/Y0WQg on line 6
Process exited with code 255 . Output for 4.3.0 - 4.3.1 Fatal error: Call to undefined function: imagecreate() in /in/Y0WQg on line 6
preferences:dark mode live preview
148.2 ms | 401 KiB | 216 Q