2020-12-26 01:42:23 +08:00
|
|
|
<?php
|
2021-01-13 19:32:26 +08:00
|
|
|
require_once("../include/bittorrent.php");
|
2020-12-26 01:42:23 +08:00
|
|
|
dbconn();
|
2022-04-01 23:13:42 +08:00
|
|
|
|
2025-10-11 23:38:27 +08:00
|
|
|
$action = $_GET['action'] ?? '';
|
|
|
|
|
$imagehash = $_GET['imagehash'] ?? '';
|
2022-04-01 23:13:42 +08:00
|
|
|
|
2025-10-11 23:38:27 +08:00
|
|
|
if ($action !== 'regimage') {
|
|
|
|
|
http_response_code(404);
|
|
|
|
|
exit('Invalid captcha action');
|
|
|
|
|
}
|
2022-04-01 23:13:42 +08:00
|
|
|
|
2025-10-11 23:38:27 +08:00
|
|
|
$driver = captcha_manager()->driver('image');
|
2022-04-01 23:13:42 +08:00
|
|
|
|
2025-10-11 23:38:27 +08:00
|
|
|
if (!method_exists($driver, 'outputImage')) {
|
|
|
|
|
http_response_code(404);
|
|
|
|
|
exit('Captcha driver does not support image rendering');
|
|
|
|
|
}
|
2022-04-01 23:13:42 +08:00
|
|
|
|
2025-10-11 23:38:27 +08:00
|
|
|
$driver->outputImage($imagehash);
|
2022-04-01 23:13:42 +08:00
|
|
|
|
2020-12-26 01:42:23 +08:00
|
|
|
?>
|