Server IP : 80.241.246.6 / Your IP : 216.73.216.188 Web Server : Apache/2.4.25 (Debian) System : Linux kharagauli 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64 User : www-data ( 33) PHP Version : 7.0.33-0+deb9u12 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/kharagauli_new/admin/captcha/ |
Upload File : |
<?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="Author" content="Jose Rodriguez" /> <title>Captcha test</title> <style type="text/css"> body { font-family: sans-serif; font-size: 0.8em; padding: 20px; } #result { border: 1px solid green; width: 300px; margin: 0 0 35px 0; padding: 10px 20px; font-weight: bold; } #change-image { font-size: 0.8em; } </style> </head> <body onload="document.getElementById('captcha-form').focus()"> <?php /** Validate captcha */ if (!empty($_REQUEST['captcha'])) { if (empty($_SESSION['captcha']) || trim(strtolower($_REQUEST['captcha'])) != $_SESSION['captcha']) { $captcha_message = "Invalid captcha"; $style = "background-color: #FF606C"; } else { $captcha_message = "Valid captcha"; $style = "background-color: #CCFF99"; } $request_captcha = htmlspecialchars($_REQUEST['captcha']); echo <<<HTML <div id="result" style="$style"> <h2>$captcha_message</h2> <table> <tr> <td>Session CAPTCHA:</td> <td>{$_SESSION['captcha']}</td> </tr> <tr> <td>Form CAPTCHA:</td> <td>$request_captcha</td> </tr> </table> </div> HTML; unset($_SESSION['captcha']); } ?> <p><strong>Write the following word:</strong></p> <form method="GET"> <img src="captcha.php" id="captcha" /><br/> <!-- CHANGE TEXT LINK --> <a href="#" onclick=" document.getElementById('captcha').src='captcha.php?'+Math.random(); document.getElementById('captcha-form').focus();" id="change-image">Not readable? Change text.</a><br/><br/> <input type="text" name="captcha" id="captcha-form" autocomplete="off" /><br/> <input type="submit" /> </form> </body> </html>