Captcha

Started on the old forum in October 2011 · view the original in the archive · old links redirect here

23 replies · 1,313 views · started 15 years ago · 1 min read

11 participants
morse Senior · 364 posts #22

razzbee wrote: Gumslone..Why are You confusing the guy if you dont want to teach him the how to do it best..I believe in teaching one how to fish so that he can fish and become better...anyway I still believe that code up there is a crap since bots can still read that thing cos before i create a bot I will have to check your html form input source code first,dont think the hidden attribute will save U ..Session I know is one of the best way to track captcha code both for mobile and pc,only that the session id is best in url for mobile that cookies(I never agreed with Gumslone that session is not the best)...

I disagree, session is a very stupid thing to be done for mobile community sites. I ended up junking session system for pure cookie based authentication (this one sucks even more) but atleast it avoids all session expiry , session change problems.

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

razzbee Developer · 130 posts #23

INSTRUCTIONS

I am sorry,I wrote the instruction with my mobile whiles in a bus...The captcha code is working perfectly

Demo : De $ Makers The instruction is edited,errors removed,plz post back if U have other errors,again you can edit it to suit your preferance

STEP 1

Extract the content to your root folder ,that is public_html or htdocs

STEP 2 Put the code below inbetween the <head> </head> of your registration page

CODE :

session_start();

STEP 3 add the code below to your form..your form must be with the extension name.php

CODE :

Captcha

External image (may be gone)

<input type='text' name='captcha' placeholder='enter captcha' />

STEP 4 Put the code below inbetween the <head> </head> of your registration page

CODE :

session_start();

STEP 5

add this to the page that will proccess the registration form

CODE :

//getting the captcha security codes $session_captcha=$_SESSION['captcha_code'];

$user_captcha=$_POST['captcha'];

//cleaning our captcha codes $user_captcha=htmlentities($user_captcha);

if(!preg_match("/(^[a-zA-Z0-9]+)$/",$user_captcha)){

die("Captcha code is invalid");

}

//comaparing if the captcha codes matches if(!strcmp($user_captcha,$session_captcha)=='0'){

die("The security code you entered is invalid");

}//end captcha check

The instruction is edited,errors removed,plz post back if U have other errors,again you can edit it to suit your preferance

I am sorry,I wrote the instruction with my mobile whiles in a bus...The captcha code is working perfectly

Demo : De $ Makers

Attachments: captcha.zip
arnage Lead · 811 posts #24

I don't know for the archive but posted instructions are full of errors. 🙂

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close