S2OJ/web/app/controllers/captcha.php
2022-03-14 13:49:48 +00:00

14 lines
244 B
PHP

<?php
use Gregwar\Captcha\PhraseBuilder;
use Gregwar\Captcha\CaptchaBuilder;
$builder = new CaptchaBuilder;
$builder->build();
$_SESSION['phrase'] = $builder->getPhrase();
header('Content-Type: image/jpeg');
$builder->build()->output();
?>