And also some small documentation fixes.
This commit is contained in:
Pinga 2023-12-24 11:36:19 +02:00
parent 1df7e548e5
commit 040428bdab
5 changed files with 30 additions and 34 deletions

13
rdap/client/captcha.php Normal file
View file

@ -0,0 +1,13 @@
<?php
session_start();
use Gregwar\Captcha\CaptchaBuilder;
require 'vendor/autoload.php';
$captcha = new CaptchaBuilder;
$captcha->build();
$_SESSION['captcha'] = $captcha->getPhrase();
header('Content-type: image/jpeg');
$captcha->output();

View file

@ -1,22 +1,6 @@
<?php
session_start();
use Gregwar\Captcha\CaptchaBuilder;
// Include this part only if the script is requested as an image (for the captcha)
if ($_SERVER['REQUEST_URI'] == '/captcha.php') {
require 'vendor/autoload.php'; // Adjust path as needed
$captcha = new CaptchaBuilder;
$captcha->build();
$_SESSION['captcha'] = $captcha->getPhrase();
header('Content-type: image/jpeg');
$captcha->output();
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>