EasyCFM.COM ColdFusion Forums / Coding Help! / a secret word

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: a secret word

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

125pr
04-13-2006 @ 2:03 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 68
Joined: Oct 2005

Hi everyone, i want to know how i can use this word as Easycfm.com site has used when posting an disscussion, it shows the random word, until you enter that, you cannot move furthur, is this a some kind of webservice and how to implement it, I know it is used for spam robots to enter the information, but till now i have not implement such thing but i am keenly interested in this.

thanks

Gurpreet Singh Randhawa
www.randhawaz.com

Ron
04-13-2006 @ 2:24 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 244
Joined: Oct 2004

That is known as a 'captcha'..something like 'computer automated process to tell humans and computers apart'. google 'alagad' to find one of several that are out there.

Webmaster
04-13-2006 @ 9:10 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

I have a free web serive on EasyCFM to handle this:


<cfinvoke webservice="http://www.easycfm.com/webservices/captcha.cfc?wsdl"
                method="generateCaptcha"
                returnvariable="easyCaptcha">
                     <cfinvokeargument name="height" value="100"/>
                     <cfinvokeargument name="width" value="200"/>
                     <cfinvokeargument name="font" value="Verdana"/>
                     <cfinvokeargument name="fontColor" value="Black"/>
                     <cfinvokeargument name="fontSize" value="22"/>
                     <cfinvokeargument name="fontOpacity" value="90"/>
                     <cfinvokeargument name="bgcolor1" value="ffffff"/>
                     <cfinvokeargument name="bgcolor2" value="ffffff"/>
                     <cfinvokeargument name="quality" value="70"/>
                     <cfinvokeargument name="distortionMethod" value="1"/>
                     <cfinvokeargument name="XPos" value="20"/>
                     <cfinvokeargument name="YPos" value="20"/>
               </cfinvoke> </P>
<P><cfset session.secretWord = easyCaptcha.CAPTCHAWORD>


Pablo Varando
Senior Application Architect
EasyCFM.COM, LLC.

904.483.1457 \\ mobile
webmaster@easycfm.com \\email

This message was edited by Webmaster on 4-13-06 @ 9:09 AM

specific
04-19-2006 @ 1:52 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 897
Joined: Apr 2006

Hi, I used your CaTCHA service thanks for this, but I am getting problem, Well I explain it from scratch,

I put the link as you provided as :
<cfinvoke webservice="http://www.easycfm.com/webservices/captcha.cfc?wsdl"
                method="generateCaptcha"
                returnvariable="easyCaptcha">
                     <cfinvokeargument name="height" value="100"/>
                     <cfinvokeargument name="width" value="200"/>
                     <cfinvokeargument name="font" value="Verdana"/>
                     <cfinvokeargument name="fontColor" value="Black"/>
                     <cfinvokeargument name="fontSize" value="22"/>
                     <cfinvokeargument name="fontOpacity" value="90"/>
                     <cfinvokeargument name="bgcolor1" value="ffffff"/>
                     <cfinvokeargument name="bgcolor2" value="ffffff"/>
                     <cfinvokeargument name="quality" value="70"/>
                     <cfinvokeargument name="distortionMethod" value="1"/>
                     <cfinvokeargument name="XPos" value="20"/>
                     <cfinvokeargument name="YPos" value="20"/>
                         </cfinvoke>
                    <cfset session.secretWord = easyCaptcha.CAPTCHAWORD>
<cfoutput>#session.secretWord#</cfoutput>

and I used the cfoutput tag to diaplay on the browser, but it is displayinh like a simple english word with no background and fancy look as like you site has, I am using this coiomponent on my sendmail page, then next Page where the mail is sent, i check for this word but it shows me error that secret is undefined in form, i am using it like this:

Element SECRET is undefined in MAIL.

The error occurred in D:\CFusionMX\wwwroot\Gallery\Gallery\Newportal\sendnow.cfm: line 1

1 : <cfif mail.secret NEQ session.secretword>
2 :      <cflocation url="sendmail.cfm?error=9" addtoken="no">
3 : <cfelse>

well where should i use it and how can i make my graphic look fancy

plz help me, thanks in advance               

riogrande
04-19-2006 @ 6:12 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 509
Joined: Mar 2003

  Play around with the value belowm changing the colours etc.:

   <cfinvokeargument name="fontColor" value="Black"/>
                     <cfinvokeargument name="fontSize" value="22"/>
                     <cfinvokeargument name="fontOpacity" value="90"/>
                     <cfinvokeargument name="bgcolor1" value="ffffff"/>
                     <cfinvokeargument name="bgcolor2" value="ffffff"/>
                     <cfinvokeargument name="quality" value="70"/>
                     <cfinvokeargument name="distortionMethod" value="1"/>


specific
04-20-2006 @ 2:50 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 897
Joined: Apr 2006

But It does not display like an image, also it does change colors

Webmaster
04-20-2006 @ 7:18 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

The web service provides returns a structure that contains the path to the image and the text on the image.

Looking at your code; the problem is with the variable "mail.secret" that should be "FORM.secret".

Pablo Varando
Senior Application Architect
EasyCFM.COM, LLC.

904.483.1457 \\ mobile
webmaster@easycfm.com \\email


Website Designed and Developed by Pablo Varando.