Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / August 2006



Tip: Looking for answers? Try searching our database.

Alagad Captcha

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dempster - 29 Aug 2006 14:56 GMT
I've been using Alagad Captcha on a number of pages to keep spam robots off
guestbooks, forums and other features. I've been very pleased with it, but I'm
having one problem.

I have it set up to create the captcha image file and display it using
CFCONTENT with deletefile="yes". When I test it, the image displays properly
and the file is deleted. But every day I find dozens of captcha image files in
the directory where they should be created and then deleted.

These images are only created when I invoke the captcha component, and I only
do that on pages where I also display and delete the image. So how are these
images being created? Is it possible if a robot calls my page that the image
gets created but since it is not displayed, it does not get deleted?

Here's how I create and display the image:

<cfset mycaptcha = createobject("component", "Captcha").configure(capdir)>
<cfset captcharesults = mycaptcha.createcaptcha("",randword)>
<img src="captchaImage.cfm?image=#capfile#">

And here's the captchaImage.cfm code:

<cfcontent type="image/jpeg" reset="No" file="#url.image#.jpg"
deletefile="Yes">
<newbie /> - 30 Aug 2006 16:45 GMT
What if the browser/robot is/was instructed to not download any images?

Would your captchaimage.cfm template get called?

Perhaps you need to add some temporary logging to the captchimage.cfm
template?  That way if you see that an image was not deleted, you can go to
the log and see if the template was called and with what URL params.

Good luck!
dempster - 30 Aug 2006 21:25 GMT
I guess that it the problem. I set up a test of my own where I called the page
using CFHTTP without displaying the image. Sure enough, the image file got
created and not deleted. I guess I could see if the file is still defined at
the end of the page and delete if so.

Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.