Build Your Own Captcha With PHP

  • Content can be easy to understand by human
  • Suitable for all types of bots abuse
  • Quick and less time consuming
  • A high quality CAPTCHA must be strong and easily usable
  • Text-based Captcha
  • Image-based Captcha
  • Video Captcha
  • Audio Captcha
  • Puzzle-based Captcha
  1. Login.php
  2. Captcha.php
  • imagecreatetruecolor(int $width,int $height) function is used to create a new true-color image. This function returns a blank image of the given size.
  • imagecolorallocate(resource $image,int $red,int $green,int $blue) function is used to set the color in an image.This function returns a color which is given in RGB format.
  • imagefilledrectangle(resource $image,int $x1,int $y1,int $x2,int $y2,int $color) function is used to create a rectangle filled with a given color in the image.
  • imagettftext (resource $image,float $size,float $angle,int $x,int $y,int $color,string $font_file, string $text) function is used to write text to the image using TrueType fonts.
  • imagepng(resource $image,int $to,int $quality,int $filters) function is used to view an image in the browser,convert any other image type to PNG and apply filters to the image.
  • imagedestroy( resource $image ) function is used to destroy an image and frees any memory associated with the image.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
CSCC LABS

CSCC LABS

Cybersecurity Comprehensive Coverage