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
368
Replies
1
Views
366
Replies
4
Views
1,888
Replies
3
Views
794
Recommended threads
Replies
52
Views
9,562
Replies
3
Views
5,908
Replies
8
Views
3,564
Replies
7
Views
3,873

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