+ Start a Discussion
EssaySeaEssaySea 

Adding reCAPTCHA to HTML Web-to-Lead

I am attempting to add a Captcha to our non-profit's web-to-lead page.  Our website is run by a third-party web developer and I have cut and pasted the HTML generated from SalesForce and emailed it to him to implement.  Since then a SPAM bot has found our site and I am now trying to add a CAPTCHA to stop it. I originally contacted our web master who pointed me back to SalesForce since they host the form.  I am trying to follow all of the written literature that is out there, but I only have a very elementary understanding of HTML and no knowledge of any other scripting languages such as PHP and cURL.  I'm trying to follow the article at the bottom of the page, which many pages seem to link to.  I (think) I've created a reCAPTCHA through Google and have a "Private" and "Public" Key.  I understand that I need to input these in my HTML script somewhere, but I'm not seeing the connection in anything I read.  For instance in the article linked below it has screen shots of a PHP and a cURL script.  Where are these scripts in cyber space?  If anyone could dumb this whole process down for me it would be incredibly appreciated.

http://malebolgia.shadowsonawall.net/code-programming/captcha-with-salesforce.html

 

Rise AnalyticsRise Analytics

Hi,

 

Spam is a pain so hopefully you get this worked out. cURL is like a package that is often included with PHP. You can ask your webhost if you don't have it to see if you can get it installed. It's pretty common, though. 

 

First thing I would do is create a blank file with a .php extension and nothing but the following:

 

<?php echo phpinfo(); ?>

 Navigate to that page. It should contain info on your PHP installation if you have PHP installed. Ctrl+F for "curl" and you should see something indicating curl is installed if you have it.

 

If PHP and cURL is installed, you'd create 2 files:

 

1. Page with web to lead script

2. check-this-first.php from the link. 

 

The public and private key go in the PHP code. They are in the last 2 screen shots of code. If you have custom objects, there is some ID re-naming that is done as well in that script. Let me know what progress you make on this.

 

Ultimately what is happening is the web to lead script gets submitted to the PHP script FIRST, then if the captcha checks out, the PHP script using cURL routes it to Salesforce.

EssaySeaEssaySea

Thank you, sorry for the late reply.  I will give this a try.