Writing a simple PHP CAPTCHA Code

yunarel

New member
Joined
Oct 13, 2014
Messages
62
Points
0
Hi guys,

I'm using php for my website and I'm wondering if are there any ways to write a simple PHP CAPTCHA Code to stop spam bots

Could some one please suggest any ways?

or should I integrated popular Captcha code like Google captcha on my site?

Thanks in advanced.
 

Hassan

New member
Joined
Nov 11, 2014
Messages
706
Points
0
You can use this

Code:
<?php
session_start();
include("captcha.php");
$_SESSION['captcha'] = captcha();
echo '<img src="' . $_SESSION['captcha']['image_src'] . '" alt="CAPTCHA" />';
?>
[URLnf="https://github.com/claviska/simple-php-captcha"]Download the latest version from GitHub[/URLnf]
 

ElixantTechnology

New member
Joined
Nov 26, 2014
Messages
622
Points
0
Personally, I would recommend utilizing technologies such as Google's reCaptcha, unless you know exactly what you're doing in the development process. However, I haven't taken the time to look at Hassan's option, it may very well be viable as well. One thing you want to look for is that the code is encrypted within the session, that way bot's can't just simply grab the information and continue through the form.
 
Latest threads
Replies
0
Views
35
Replies
0
Views
35
Replies
1
Views
47
Replies
3
Views
111
Recommended threads
Top