òÊS JJ]+m!E@@]  ! 5*5daisyubuntucomÊSvLL]+m!E>@@S j# 5**daisyubuntucomÊSm!]+EΔ? ! 5 ]daisyubuntucom [\7 [\9Ens1 canonicalEns2REns3RNy[^j`[_|ÊSm!]+EΟ'>j# 5 Qdaisyubuntucom [\7 [\9Ens2 canonicalEns3REns1R|y[^N`[_jÊS]+m!Eb@ j#*%EΟ'>j# 5 Qdaisyubuntucom [\7 [\9Ens2 canonicalEns3REns1R|y[^N`[_jÊSڛNN]+m!E@@@[  !5,#www phpcaptchaorgÊS m!]+E? ! 5}s#www phpcaptchaorg //2L3HrevivalitsmynscomHns2VÊSJJ]+m!E<@@j 2L3JPM@9{ 0 ÊSU NN]+m!E@@@[  !]65,>www phpcaptchaorgÊSg m!]+E? ! 5]6}>www phpcaptchaorg //2L3Hns2itsmynscomH revivalRÊS JJ]+m!E@@]  !5*@daisyubuntucomÊSm!]+EΔ? ! 5뫀ʁdaisyubuntucom [\7 [\9Ens3 canonicalEns2REns1R|x[^j`[_NÊSBBm!]+E4@0%E2L3 PJyM@6& Rz0 OÊS0m!]+E@0"2L3 PJyM@6:H S0 OHTTP/1.1 200 OK Date: Sun, 01 Jun 2014 06:10:16 GMT Server: Apache X-Pingback: http://www.phpcaptcha.org/xmlrpc.php Link: ; rel=shortlink Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Set-Cookie: PHPSESSID=be8bb74c0bd68d1fc75a8b0675c8024f; path=/ Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8 a6 16 Securimage PHP Captcha 1 15 | Quickstart Guide c 2c 49 3 77 74 7f 51 50 5a 3f 77 3d 26 24 1e 6e
4 1f
22 8

10 Quickstart Guide 27

5 1f
6 1224

Securimage requires no configuration after downloading. All you need to do is display the captcha image somewhere in your form, and validate the code submitted from within your form processor. Customising the image is also very easy. This guide explains the process of adding Securimage to an existing form.

First, download Securimage and upload the files to your web server if you have not done so already. In this example, we assume that the Securimage files have been uploaded to a folder named “securimage” in the root of your web directory (i.e. www.yoursite.com/securimage/).

Next, we will insert the captcha image into your form along with a text field for the user to type the code in.

At the desired position in your form, add the following code to display the CAPTCHA image:

<img id="captcha" src="/securimage/securimage_show.php" alt="CAPTCHA Image" /&gÊSrm!]+Eܪ@02L3

PJz&M@6zN
Uq0
t;

Next, add the following HTML code to create a text input box:

<input type="text" name="captcha_code" size="10" maxlength="6" />
<a href="#" onclick="document.getElementById('captcha').src = '/securimage/securimage_show.php?' + Math.random(); return false">[ Different Image ]</a>

Note: You can change the maxlength and size properties to match your image settings.
The second line is optional but gives the user the ability to display a new image if they are having trouble reading the image that was displayed.

Once you get the image added to your form and are satisfied with the look, we will move onto editing the PHP code that validates the CAPTCHA code typed in by the user.

Open the PHP file that processes the form data after submission.
You can find this by looking at the action value inside your <form> tag.

Note: In order to use Securimage, your form processor must be written in PHP.

On the very first line of the form processor, add the following code:

<?php session_start(); ?>
It is important to put this at the top of the file before any HTML output, otherwise the validation may always fail.

The next fÊS̍JJ]+m!Em!]+Eܪ@02L3 PJz+M@6x U0ew steps will vary depending on how form validation is handled in your code. If you have little or no php knowledge the next part can be difficult.

To check if the code is correct, we will make a call to the Securimage class. The following php code should be integrated into the script that processes your form and should be placed where error checking is done. It is recommended to place it after any error checking and only attempt to validate the captha code if no other form errors occured. It should also be within <?php ?> tags.

include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php';

$securimage = new Securimage();

This includes the file that contains the Securimage source code and creates a new Securimage object that is responsible for creating, managing and validating captcha codes.

Next we will check to see if the code typed by the user was entered correctly.

if ($securimage->check($_POST['captcha_code']) == false) {
  // the code was incorrect
  // you should handle the error so that the form processor doesn't continue

  // or you can use the following code if there is no validation or you do not know how
  echo "The security code entered was incorrect.<br /><br />";
  echo "Please go <a href='javascript:histoÊSBB]+m!E4@@d

2L3JPM@z1^{
0_UÊSm!]+Eܪ@02L3

PJz1^M@6
U0ry.go(-1)'>back</a> and try again.";
  exit;
}

The call to the check method checks the generated CAPTCHA code against the code entered by the user. If the code was incorrect, an error message is printed with a link to go back to the form and the script is terminated with exit().
Make sure you check the code BEFORE the form is emailed or entered into a database and only if there were no other form errors.

Following the directions above should get Securimage working with minimal effort. Learn how to customize the captcha images or check out the faq page if you are having problems getting your form to work.

2a
36
1a 48
1f

c 115 comments 10 “ 10 Quickstart Guide 34 ”

29c3b

Unfortunately I can’t get this to work, this is the fourth php captcha version I’ve tried to install/implement &amÊS<m!]+Eܪ@02L3 PJz7M@6 U0p; none of them are working, maybe there’s something wrong with my PHP install?

hello 
I have installed latest version securimage. 
You do not see the image, which may be the reason?

ÊSm!]+Eܪ@02L3 PJz

Giovanni caro talvolta il pacchetto se piazzato in un path particolare non può essere richiamato.

Hi.
I get this error :
Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /homez.131/samyabra/www/securimage/securimage.php on line 201
can’t figure out why… any clue ?

This means you have PHP 4 which is very old and no longer supported by PHP. You will need to ugprade to 5 or try Securimage 2.0.2 which will work but is also not supported anymore.

Got it to work but not it doesn’t.

Basically it keeps saying that it’s wrong.

Sometimes it works….i don’t get the pattern though.

How would I get the error message to show in a span tag under the captcha instead of going to a new page?

Is there any option to validate the code with javascript.

Use ajax to validate it with the server. Javascript is client side and is easily bypassed by bots.

Hello,

First off, great work on this script!

I’m having an issue where the $securimage->check() function is always returning true regardless of whether the CAPTCHA is correct or not. I dumped the $_SESSION array which I’ve included below. The data is clearly there, but it fails to validate. Any idea what might be causing this?

Array ( [securimage_code_disp] => Array ( [default] => VsvsLf ) [securimage_code_value] => Array ( [default] => vsvslf ) [securimage_code_ctime] => Array ( [default] => 1395862146 ) [last_activity] => 1395862613 )

Thanks in advance for your help!

I started to receive a bunch of automated SPAM on my site (http://www.rainbowloompatterns.com/rainbow-loom-patterns/contact-us), so I looked at the various PHP-based captcha solutions.

This one is by far the easiest to install and implement, and provides a great user experience.

Great work! 10 out of 10 !

ÊSm!]+Eܪ @02L3 PJzoM@6 V0]

Hi,

The script is working fine on the UI, however, I cannot get it to work on the backend.

I have a form where the fields are validated in a javascript (name, email and the likes) ÊS_m!]+Eܪ @02L3 PJzu>M@6  V0]and then i send a jquery post to a php processor (to send an email)

in this php processor, i do set the session and the instructions as mentioned in the doc. however, i don’t get messages / errors for incorrect captcha codes! it would help if you could shed some light on what might have gone wrong!

Again, thanks for the script.

{ 0VÊSUEm!]+Eܪ@02L3 PJzzM@6 V0aomment-entry" id="comment-8921">

To get an error message back to the browser you need to send a JSON response that your javascript code checks for and shows to the user if necessary. So your PHP form processor needs to send a response back to the javascript that it understands, otherwise what happens on the PHP end will be unknown to the user.

Awesome code! Thanks so much – excellent work!

Thanks a lot!<ÊSAFm!]+Eܪ@02L3 PJz6M@6. V0abr /> It works for me on my test server!
Best wishes! 

Thank you for these useful scripts for free.
Reading through the comments and regarding the time of CaptcÊS&Gm!]+Eܪ@02L3 PJzM@6 V0aha being validated, I was wondering fi we could Ajax to validate Captcha regardless to if it is a regular contact form or a login form. After all, the Captcha thing is necessary to check if it is a bot machine filling up the form and not to check the right or wrong of the user’s entries, there after I think that the check could be done on separated files (time).
Have I gotten anything wrong about it?
Thanks in advance

Thanks for this awesome service! I’m using it on a brand new site i’m making (not up yet). It was a bit tricky getting it to work with a custom session_start() function. For anyone using a custom session_start() function (like the more secure one at http://www.wikihow.com/Create-a-Secure-Login-Script-in-PHP-and-MySQL ) you’ll need to modify secureimage.php as follows:

add this at the beginning:
include_once ‘path_to_your_php_script_containing_custom_session_start_function’;

then change lines ~708-716 to the following (make sure you’re replacing the right section! It should look like the following without all the commented lines of code and without the “custom_session_start()” line):

if ($this->no_session != true) {
       // Initialize session or attach to existing
       if ( session_id() == ” ) { // no session has been started yet, which is needed for validation
           //if (!is_null($this->session_name) && trim($this->session_name) != ”) {
           //    session_name(trim($this->session_name)); // set session name if provided
           //}
           //session_ÊSqm!]+Eܪ@02L3 PJz.M@6A; V0cstart();
           custom_session_start(); //<– replace with your custom session_start() function
       }
}

@admin: feel free to let me know if there is a better way to replace the "session_start()" function in the secureimage.php script; I'm new to PHP and by no means claim to be an expert in the matter.

Hi, thanks for the comment. There is actually no need to modify the securimage class to use your custom session.

Just modify securimage_show.php and securimage_play.php to include the custom session class, and start the session right after the include (before the call to “new Securimage()”). When securimage is called, it will detect that there is an existing session and will not attempt to start one and instead will use the existing session.

Awesome project!
Implemented in 5 minutes and works perfect.

I didn’t expect, it will be so faultless ;)

Great script!

Hi,

I have a question. You say only to validate the CAPTCHA after everything else has checked out OK – however if this were a DoS attack on a login with a known uid but a garbage password, the form would already have logged the failed login attempt before the CAPTCHA code was reached.

Wouldln’t it be best to check the CAPTCHA first. You’re going to check it anyway and reject the login attempt anyway if it’s wrong. So wouldn’t it be better to check it first? You can then return the user to the login page without logging a failed login attempt against the user.

Or am I missing something?

In the case of a login, I think your idea makes more sense. The recommendation of checking the captcha after everything else has checked out is more specific to contact and registration forms. In those cases, there is no reason to check the captcha if some of the inputs are invalid. In your case, I think it is reasonable to check the captcha before validating the login. Thanks for pointing that out.

drew
01.14.14 at 9:58 am

Thank you very much for providing this great script.  Would like to say a big thanks for this script.

Just wanted to say that this product is fantastic. I first tried recaptcha, and it just would never work. Not only that but the captchas it generated were all incredibly difficult to read and littered with ambiguous characters.

Securimage however worked perfectly right out of the box and behaves exactly as expected. The test script that came with it was brilliant as it was something recaptcha did not have and it told me right off the bat that I could run securimage on my server. Thank you for providiÊSBB]+m!E4@@S 2L3JPM@z.{ 0VÊSm!]+Eܪ@0w2L3 PJzM@6P V0mng this great software.

Hi, Its awesome… thanks a lot. Can you tell me how to make it case sensitive? what happened is that, if the image shows “HG2fn3RÊSj m!]+Eܪ@0w2L3 PJznM@6* V0m43; and if I put it as “hg2fn3″. then it is validating as correct. i want to make it case sensitive.

The simplest way to make the image case-sensitive is to edit securimage.php and set $case_sensitive = true.

Alternatively, you cÊSYm!]+Eܪ@0w2L3 PJzM@6/ V0man modify securimage_show.php and your form processor and set the case_sensitive property from both of those places.

This captcha is really good! Thanks. Got in up and running in minutes on my local server but it took me hours toÊSm!]+Eܪ@0w2L3 PJzϾM@6+ V0m track down why I couldn’t get it working on a hosted Apache server. I’ll post what the issue was in case others have the same problem. If the captcha isn’t validating check your $_SESSION array and make sure there’s some values stuff from securimage in it. You can use print_r($_SESSION) to take a look. I’m used to running my own servers where I set everything in /etc/php.ini or whatever which is why I didn’t suspect the actual problem here. If a database isn’t used also check cookies in the web browser. Firefox -> Page Info -> Security or whatever.

Description of problem: captcha images worked, refresh and audio swf worked as expected. But validation was not possible. First thing I had to do was set a writable session directory. I set the temp directory for sessions a step above public_html by adding an entry to a php.ini file in public_html. Session files were now being created but all were empty – size 0.

To cut a long story short I had to place a php.ini file in each directory on the server including the secureimage directory to get sessions to function properly. Here’s the relevant contents of the php.ini:

session.save_path = “/home/mysite/temp”
session.cookie_path = “/”

Thank you! Works perfectly out of the box.

I have installed the script as indicated. However, when I submit a form on my site I get the following, regardless of the correct characters being submitted.

“Sorry, the code you have entered was invalid! Please try again.”

Any help is appreciated.

First, try running the included example_form.php script included with Securimage. If that works, there is a problem with the form processor and/or validation code. In that case see this faq entry.

If it does not work, the server may not be properly configured. In that case, try the Securimage Test Script and see if it is able to reveal the issue.

If those don’t help, let me know as many details as you can and send the forÊSnvm!]+Eܪ!@0s2L3 PJz^M@6< W0m processor code or provide a live URL and I can take a look.

great catcha, thank you, works like a charm

#@@Aa H[yP<0OBP@GET /avatar/9aa9b973bc32fb2a8de8b7b9905abf01?s=48&d=%3Cpath_to_url%3E&r=R HTTP/1.1 Host: 1.gravatar.com User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0 Accept: image/png,image/*;q=0.8,*/*;q=0.5 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://www.phpcaptcha.org/documentation/quickstart-guide/ DNT: 1 Connection: keep-alive ÊSBB]+m!E4@@L 2L3JPM@z඀{ 0WÊSm!]+Eܪ%@0o2L3 PJzM@6 W0ass="comment-meta commentmetadata">
Dory
09.14.12 at 4:31 am

Aloha, I got the form to work but I am not getting any emails.

Thanks for your help
Carlos

Hi, I see you are using the example_form.php file as your base. At the top, there is a comment about the

$DEBUG_MODE

variable. If set to 1, no mail is sent, and only the captcha field is validated. If you set that to 0, the call to

mail()

should function, and it will also validate the name, email, and comment fields.

ÊSBBm!]+E4ٝ@02L3 PY̎@6 W0ÊS0m!]+Eٞ@02L3 PY̎@6> W0HTTP/1.1 200 OK Date: Sun, 01 Jun 2014 06:10:17 GMT Server: Apache Last-Modified: Sat, 09 Nov 2013 18:56:32 GMT Accept-Ranges: bytes Content-Length: 93085 Connection: close Content-Type: application/javascript /*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license */ (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||ÊSm!]+Eٞ@02L3 PY̓6ޮ W0r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arÊSm!]+Eٞ@02L3 PY̙6A W0guments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:fÊSBBm!]+E4@02L3 PVoM6 W0ÊS3m!]+E@02L3 PVoM6H W0HTTP/1.1 200 OK Date: Sun, 01 Jun 2014 06:10:17 GMT Server: Apache Last-Modified: Sat, 09 Nov 2013 18:56:32 GMT Accept-Ranges: bytes Content-Length: 7200 Connection: close Content-Type: application/javascript /*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */ jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:cheÊSm!]+E@02L3 PVM6 W0cked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must startÊSm!]+E@02L3 PVƿM66 W0 with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!=ÊSjm!]+Eܪ'@0m2L3 PJzVM@6 W0

Hello,

No problem with the bulk of it, but, although the HTML input field is plenty long enough, the cursor stops after 5 characters and will not allow a 6th one (and most of the images generated are 6 characters). Have you seen this happen before? :-(

Sorry to say I haven’t seen that issue. But whatever it is, it is related to the browser and not PHP. Make sure the text input tag doesn’t have the

maÊS/BB]+m!E4@@K

2L3JPM@z{
0WÊSvm!]+Eܪ)@0k2L3

PJ{M@6q
W0xlength

attribute set to 5 as that will cause that issue.

I am new to PHP so just trying out your captcha code on a localhost site.
The captcha image does not show – I just get an image marker with the words &ÊSm!]+Eܪ)@0k2L3 PJ{NM@6t W0#8216;CAPTCHA Image’ using code . There is no problem showing another image from the site using code

Most likely PHP doesn’t have GD support which is required for creating iÊSa m!]+Eܪ+@0i2L3 PJ{ M@6 W0mages. You can download the Securimage Test Script and it will tell you if your system is capable of using Securimage.

Securimage_test.pnp confirms that I have not GD support. How do I obtain thatÊS m!]+Eܪ+@0i2L3 PJ{M@6 W0 in PHP 5.4.2 ?

See GD Installation on php.net. Basically, on WinÊS m!]+Eܪ+@0i2L3 PJ{FM@6> W0dows you have to enable

php_gd2.dll

which comes with PHP, on Linux, you have to re-compile PHP using the

--with-gd

option. You will also have to have at least libpng installed on your system to generate PNG files.

How do I install libpng ?

Hello I am facing problem with include_once $_SERVER['DOCUMENT_ROOT']

“Message: include_once(/var/www/http://205.186.144.160/chauka/securimage/securimage.php): failed to open stream: No such file or directory”

Please guide me thank you.

ÊSF BB]+m!E4@@J 2L3JPM@zV{ 0WÊS 6 BB]+m!E4@@, 2L3YP̓{ 0WÊSU BB]+m!E4@@+ 2L3YP̙?{ 0WÊS^ m!]+Eܪ/@0e2L3 PJ{$M@6> X 0

The path being included for Securimage is incorrect. You just need to fix the

include_once

path to match your actual path. In this case,

$_SERVER['DOCUMENT_ROOT']

is incorrect and appears it cannot be used, or the path you have appendeÊS#_ m!]+Eܪ/@0e2L3 PJ{*>M@6/2 X 0d to it is incorrect. Your host may be able to help with the correct path.

Hi all, 

I’m using the latest Securimage 3.2RC2. It works great and I want to congratulate and thank you for this captcha. 

I had aÊSa m!]+Eܪ/@0e2L3 PJ{/M@6X X 0 question… I set the the expiration time of the captcha to 3 hours 
{code}
$img->expiry_time   = 10800;
{code}

But the captcha is always invalidated before this time. 

Does anybody here have experienced this or managed to deal with it ?

Is it related to Securimage or to PHP configuration ?

Thanks for your help,

Alexboss 8)

Hi, thank you for the comment.

This is probably due to a PHP configuration. Since the codes are stored in a PHP session by default, your session data may be getting garbage collected long before the 3 hours is up. See the session.gc_maxlifetime PHP setting.

By default PHP will potentially delete all session data older than 24 minutes if it hasn’t been touched in that long. The client may still have the session cookie, but the server has deleted the data so the cookie is no longer valid. Editing this value in php.ini or by other methods is a solution, or set your expiry_time to match PHP’s session.gc_maxlifetime value.

Hi Drew, 

Thanks for your reply… indeed the session.gc_maxlifetime was set to the default value (1440 seconds / 24 minutes). 

I updated my code to make the session lifetime longer – in a .htaccess at the root of my folder : 
{code}
php_value  session.gc_maxlifetime 10800
{code}

And I also updated the files securimage_show.php / securimage_play.php by adding 
{code}
// How long in seconds a captcha remains valid, after this time it will not be accepted
$img->expiry_time   = 10800;
{code}
after
{code}
$img = new Securimage();
{code}

So far it works as expected ! 

Thanks a lot, 

Alexboss 8)

I am using version 1.0.3.1

I know its old but it was customised for me by a coder to fit my site with variables and it may be a little difficult to change. (example: http://www.spain-holiday-sun.com/holidays/detail-20214-Apartment-Florida-Three-Bedroom-Holiday-Home-In-Javea-Near-To-The-Port.html

Any ideas what could be the problem?

Note: It works fine on IE but fails on FF and Opera

Thanks

ÊS. m!]+Eܪ3@0a2L3 PJ{L.M@61 X,0

Hi, great code. I have a small problem, when I open a page with the form on, fill out the form and add the captcha, submit, the error says “Enter correct Captcha” although the captcha was correct. However, when I refresh the captcha, and add the letters the form sends. What could be the problem. Thanks

ÊS m!]+Eܪ3@0a2L3 PJ{QM@6G X,0

Do you know what version you are using? From the look of it it may be an older version.

Installed in 10 minutes, it was that simple, hope it will prevent me from spambots.
Great script, Thanks a lot.

I normally build my own Captcha’s. But it takes a little while. This script has made my life a lot easier. I tried a few, and this one took me less than 5 minutes to setup. I can set it up on a site, distribute it through all the forms, and be done in less than 20 minutes. Really saved a lot of time, and literally faster/easier to setup than any of the other ones I have tried online.

Thanks for this.

Hi all,
This is a simple code to implement Captcha, It worked for me.
CAN ANY ONE HELP ME in adding Audio to the Captcha.
i would consider it as great help.

Thanks
Kalai

Sure, if you send me a message directly using the email address in the headers of securimage.php or use the contact form on the site, send me some information and code you have tried and I can take a look.

ÊS\d m!]+Eܪ9@0[2L3 PJ{nM@6a XN0

Hello,
captcha image does not load, this is the error:
Fatal error: Call to undefined function imageftbbox () in / ** / site / securimage / securimage.php on line 717

Hello,
It appears that PHP on the server you are using doesn’t meet all the requirements. No imageftbbox function means PHP is not compiled with FreeType (TTF) support. Try downloading the Securimage test script and running that on your server and seeing what the results are.

i’ve used captcha script in cakephp .captcha images are display,but captcha code is not validate.

Did you add the validation code in the correct place? Try the example_form.php script included with the securimage files and see if that validates successfully. If not, please post back and let me know so we can figure out what configuration on the server is preventing it from working. Also try the securimage test script: http://www.phpcaptcha.org/downloads/securimage_test.php

Great work not a php programmer but am somewhat smart.. so figured out where in the php everything should go.. although the first php line would be confusing to a novice since you include the closing tag.

For those novices:
ends the php script as in opening closing your html tags to open and to close.
Also I just included the rest of the scripts after the calls to ” if” which i figured were the form checking functions. Not all php forms created the same but maybe this could help others in a bind. ***** Anyways THANK YOU SO MUCH FOR THIS CAPTCHA SCRIPT**** it has been invaluable I was getting 10 to 20 bogus form submissions a day. God bless you for sharing!!!

Wow, this worked beautiful right out of the gate. Thank you for sharing your files and easy to follow instructions. They have been very helpful.

\
',gallery_markup:'',image_maÊS m!]+Eܻ@0 2L3 PXuIc?6 Xf0rkup:'',flash_markup:'',quicktime_markup:'',iframe_markup:'',inline_markup:'
{content}
',custom_markup:'',social_tools:'

Thank you VERY MUCH for providing this script.  Works GREAT! and easy to install.

Thank you Drew for being SO VERY helpful and quickly responding to my emails!!!
Awesome captcha, I have tried Google’s recaptcha previously and had lots of issues with it.

Keep up the great work!

I would like to validate my form with jQuery. How do I check the correctness of the code entered? how do I let him take the result of $ securimage-> check (‘text field security code’)? thanks

You can use jQuery to submit the form, the correct way to do it would be to return any error messages from your ajax call back to the browser. Just make sure you only process the form on the server if the code was correct. The code for the form processor would not be very much different than normal except you should return success/error messages in JSON or XML format so your jQuery code can decide if the form was submitted or not. Also, for best results, don’t try to call check() on the captcha code unless there are no other errors on the form and it is ready to be submitted.

Hello, I was using securimage on 2.0.2 version, but it was hacked by bots quite fast so I tried to upgrade to v.3.0, however easy switch (just replacing files) didn’t work, no image showed, when i tried to see the image on exact path to securimage_show.php it wrote an error I have not seen before using securimage:

Warning: Cannot use a scalar value as an array in /home/e-boszkowo/ftp/securimage/securimage.php on line 1046

Warning: Cannot modify header information – headers already sent by (output started at /home/e-boszkowo/ftp/securimage/securimage.php:1046) in /home/e-boszkowo/ftp/securimage/securimage.php on line 889

and some more of the “cannot modify header” errors.
session is started exactly on first line of the page, have no idea where to look now. Any help? Thanks in advance.

This was because the structure of the session changed between the 2 version. Just clear the cookies from your browser for your site and the error should go away. I do want to release a new version that fixes that problem though. Sorry for the trouble.

Hello everyone, I just wanted to share some good news. If you are using the older version of Securimage and it is not working with your IE 9, you can install the new Securimage 2.0.2 version and it will solve the problem (It did for me). Great program!

hy
Today I was inundated with spam via my contact form. therefore, I have integrated your script. your script is really easy to install, thanks you’ve done the work. nice that you provide it.
excellent work!

There is a problem with the XFBML Facebook Button. In the Internet Explorer and only in this browser, the Facebook Button reloads the page and generates a new code in securimage. I searched the error for about 5 hours!

I hate Facebook and still like your captcha script!

Hi, this is a great script, i installed it on http://www.organicbaby.ro/blog.php and it works perfectly!

10x

HDesign.ro
03.23.11 at 11:31 pm

Just want to say thank, much love for the script you provided. I was getting hit with spam bots so i appreciate it. Very easy to upload. Thanks

Do have one question if you could assist, how can i make the input text area and my reset and submit buttons bigger?

CSS would be the easiest way to do that. With the input box, if you increase the font size you can increase the input size, or like with a submit button, you can also specify the height and width manually:


<input tÊSMRBB]+m!E4@@ 2L3YPȀ1{ 0[ÊSXhm!]+Eܪ@02L3 PJ|M@6G [0ype="text" name="captcha_code" style="font-size: 16px; height: 20px; width: 180px" />
<input type="submit" value="Send Form" style="height: 30px; width: 81px; padding: 4px 2px" />


ÊSqBB]+m!E4@@ 2L3YPp^{ 0[ÊSm!]+Eܪ@02L3 PJ|vM@6k [0

Leave a Reply


CAPTCHAÊS%������]+m!�E�3@�@

2L3X�Pc=u�
��
0VGET /wp-content/themes/orion/js/prettyPhoto.js HTTP/1.1
Host: www.phpcaptcha.org
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://www.phpcaptcha.org/documentation/quickstart-guide/
Cookie: PHPSESSID=be8bb74c0bd68d1fc75a8b0675c8024f
DNT: 1
Connection: keep-alive

ÊS�B���B����]+m!�E��4@�@

2L3Y�Ph{��
0[ÊS�����m!�]+�E�ܪ@�02L3

�PJ|P^M@�6zX��
[0a71c550b14bac1c?s=48&d=%3Cpath_to_url%3E&r=R' class='avatar avatar-48 photo' height='48' width='48' />						  						  <div class= Scott
07.12.11 at 4:08 pm

How do you use AJAX on this? Any simple code I can look at?

Thanks.

THANKS VERY MUCH!
EASY AND COOL! =)

M6-1 ÊSYD m!]+E;ĠH[o PݕPGëHTTP/1.1 403 Forbidden Connection:close M6-1 ÊSwb BB]+m!E4!@@ 2L3YP{ 0[$ÊS ^^]+m!EP-@@ 2L3JPM@{fN{ 0Z^|l||aV|f|V|[ÊSߢ ^^]+m!EP.@@ 2L3JPM@{fN{ 0Z^{Ȟ{F|l||aV|fÊSr ^^]+m!EP/@@ 2L3JPM@{fN{ 0Z^{ٖ{>{Ȟ{F|l|ÊS 66]+m!E()9@@W H[oݗP&YPÊS 66]+m!E(@@ H[oݘP瀖8QKPÊS ^^]+m!EP0@@ 2L3JPM@{fN{ 0Z^{ٖ{{Ȟ{F|l|ÊSL m!]+E@02L3 PRǻˀ6\ \0ng) no-repeat right center; } /* Sublevel BG Color */ #nav li ul {background: #005e92; border-top: 1px solid #0076ad; border-left: 1px solid #0076ad; border-right: 1px solid #0076ad; } /* Sublevel Borders */ #nav ul li li { border-bottom: 1px solid #0072b1; } /* Sublevel Link */ #nav ul.menu li li,#nav ul.menu li li a, #nav ul.menu li:hover li,#nav ul.menu li:hover li a, #nav ul.menu li.sfHover li,#nav ul.menu li.sfHover li a { color: #fff; text-shadow: none; background-image: none; } #nav .menu li li a, #nav .menu li li a:visited { /* visited pseudo selector so IE6 applies text colour*/ border-bottom: 0px solid #608727; } /* Sublevel Link Hover */ #nav .menu li li:hover, #nav .menu li li.sfHover, #nav .menu li li a:focus, #nav .menu li li a:hover, #nav .menu li li a:active { background: #0076ad; color: #fff; text-shadow: none; } /* Prevent Sublevels from inheriting BG images */ #nav li ul li a, #nav li.active ul a, #nav li.current-cat:hover li a, #nav li.current-cat:hover li a:hover, #nav li.current_page_parent li.current_page_item, #nav li li.current_page_item a, #nav li li.current_page_item:hover li a, #nav li li.current_page_item:hover li a:hover, #nav li.current_page_parent:hover li a, #nav li.current_page_parent:hover li a:hover { background-image: nonÊSL ^^]+m!EP1@@ 2L3JPM@{fN{ 0Z^{ٖ{{Ȟ{F|l|ÊS m!]+E@02L3 PRǻ1ˀ6
Orlando Maxx
04.06.12 at 6:50 am

Wow, this worked beautiful right out of the gate. Thank you for sharing your files and easy to follow instructions. They have been very helpful.