weeklyd3
@weeklyd3
0
How to make a PHP CAPTCHA
The repl attached above is an example of a home-made CAPTCHA, without any packages to install. You will need:
Access to GD and image functions (details)
A PHP repl where you want to implement the CAPTCHA
Access to the filesystem
Part 1 - The bare-bones HTML
We need a form that displays the image and lets the user enter the text in the image. The code looks somewhat like this:
" method="post">
` with the URL of the CAPTCHA processing form. -->
Please enter the characters you see in the image:
Don't run it just yet! The image won't load because there is no render.php file.
Part 2: Displaying the Image
We will use the GD/Image functions for this.
Start the session, which will be used to store the answer.
Tell the browser to interpret it as a PNG image. (PNG works better with text; the text shows up more clearly than JPG. Trust me, I tried!)
header("Content-Type: image/png");
Generate the string to put on the image (Here, only numbers are used, but you can use any character set you want.)
$string = '';
for ($i = 0; $i
Have fun!
Make sure to open it in a new tab (repeat: open it in a new tab); otherwise, it will not work.9
1
0
0
Fake-CasinoA fake casino program, made entirely for fun.
30
1
0
weeklyd3 **Note:** I am *not* responsible for anything caused by this program, including addiction. *thought y'd know, but :)*2 years ago
0
PHP-QuizMaking a simple quiz with PHP. Contributions are welcome, make pull requests to this GitHub repository: https://github.com/weeklyd3/PHP-Quiz. Thanks!
17
1
0
weeklyd3 For your own Web site, you can more or less just copy off the code, change a few names, remove the password prompt, and use it.2 years ago
Full source code: repl chat-room-demo attached
Starting Steps
Hit "New Repl", choose "PHP Web Server" as your language, and then type "My Chat" (or s
PHP Web Server