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
2
Views
114
Replies
1
Views
187
Replies
6
Views
418
Replies
11
Views
544
Replies
2
Views
238
Recommended threads
Replies
8
Views
7,223
Replies
1
Views
1,877
Replies
7
Views
4,176
Replies
8
Views
2,662

Latest postsNew threads

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top