1 2 3 4 5 6 7 8 9 10 11 12
<?php use Gregwar\Captcha\CaptchaBuilder; $phrase = generateCaptchaText(); $builder = new CaptchaBuilder($phrase); $builder->build(192, 48); $_SESSION["captchaPhrase"] = $phrase; header("Content-Type: image/jpeg"); header("Pragma: no-cache"); header("Cache-Control: no-cache"); $builder->save(null, 40);