mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-24 20:58:42 +00:00
12 lines
295 B
PHP
12 lines
295 B
PHP
<?php
|
|
|
|
use Gregwar\Captcha\PhraseBuilder;
|
|
use Gregwar\Captcha\CaptchaBuilder;
|
|
|
|
$builder = new CaptchaBuilder(null, new PhraseBuilder(4, "2345678abcdefhkmnrstuxz"));
|
|
$builder->build();
|
|
$_SESSION['phrase'] = $builder->getPhrase();
|
|
|
|
header('Content-Type: image/jpeg');
|
|
$builder->build()->output();
|