summaryrefslogtreecommitdiff
path: root/src/application/actions/captcha/get.php
blob: a75b60d054f4cc4b3473a3227aa434592e8b1bf7 (plain)
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);