dhiforester

captcha.php

Mar 29th, 2021
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2.     session_start();
  3.     header("Content-Type: image/png");
  4.     $_SESSION["Captcha"]="";
  5.     $im = @imagecreate(110, 50) or die("Cannot Initialize new GD image stream");
  6.     $background_color = imagecolorallocate($im, 48, 128, 117);
  7.     $text_color = imagecolorallocate($im, 176, 201, 197);
  8.     $angka=rand(1000000, 9999999);
  9.     $_SESSION["Captcha"].=$angka;
  10.     imagestring($im, 20, 25, 10,  $angka, $text_color);
  11.     imagepng($im);
  12.     imagedestroy($im);
  13. ?>
  14.  
Add Comment
Please, Sign In to add comment