mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-24 03:20:33 +02:00
parent
1df7e548e5
commit
040428bdab
5 changed files with 30 additions and 34 deletions
13
rdap/client/captcha.php
Normal file
13
rdap/client/captcha.php
Normal 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();
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue