style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>Need help with reCAPTCHA. Never installed it =
before.
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>When Submit is clicked the =
"quoterequest-redirect.php"
is run but I think it would be better to test the reCAPTCHA before the =
"quoterequest-redirect.php"
program has been run.
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>The reCPATCHA show correctly but I need some help =
here.
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>Thanks very much again,
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>..../Ernie
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>****************************************** *************=
****
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'><form =
action=3D"quoterequest-redirect.php"
method=3D"post" >
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'><td>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> <?php
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> // call the =
lib..
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
require_once('recaptchalib.php');
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> // Get a =
key from
http://recaptcha.net/api/getkey
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> $publickey =
=3D
"6LeGhwwAAAAAADNm2bEIkxzNHXIjpAlGYJ5NCYju";=
p>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> $privatekey =
=3D
"6LeGhwwAAAAAAFbi37aANuHliCnZ-_jg3uN8N7oh";=
p>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> # the =
response
from reCAPTCHA
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> $resp =3D =
null;
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> # the error =
code
from reCAPTCHA, if any
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> $error =3D =
null;
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> # was there =
a
reCAPTCHA response?
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> if
($_POST["submit"]) {
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> &=
nbsp;
$response =3D recaptcha_check_answer($privatekey,
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> &=
nbsp;
$_SERVER["REMOTE_ADDR"],
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> &=
nbsp;
$_POST["recaptcha_challenge_field"],
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> &=
nbsp;
$_POST["recaptcha_response_field"]);
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> =
if
($response->is_valid) {
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> &=
nbsp; &n=
bsp;
echo "Yes, that was correct!";
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> &=
nbsp;
} else {
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> &=
nbsp; &n=
bsp;
# set the error code so that we can display it
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> &=
nbsp;
echo "Eh, That wasn't right. Try =
Again.";
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> &=
nbsp;
}
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> =
}
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> ?>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> <?php echo
recaptcha_get_html($publickey, $error); ?>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'></td>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> <input type=3D"submit"
name=3D"submit" id=3D"submit" =
value=3D"Submit" />
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> </form>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'>
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'>