Jump to content

reCAPTCHA


eaglelegend

Recommended Posts

I am trying to install a reCAPTCHA system on my site, starting of with register, however it comes up with:

 

Error:

Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /misc/39/000/171/334/2/user/web/elv3.eaglelegend.com/register.php on line 50

 

Source Code:

<?php

$page_title = "Register";
$rank_check = 0;
include "header.inc.php";

if (!$remember_day) { $remember_day = "DD"; }
if (!$remember_month) { $remember_month = "MM"; }
if (!$remember_year) { $remember_year = "YYYY"; }
if ($remember_gender == 1) { $rememberFemale = " SELECTED"; } else { $rememberMale = " SELECTED"; }

function getAvatarList($username='')
{
   global $findProfile;

   $a = "<option value='blank.gif'>Select Avatar</option>";

   $q = mysql_query("SELECT * FROM `avatar` WHERE `SECRET` = '0' AND `MEMBER_USERNAME` = '0'");
   while($f=mysql_fetch_array($q))
   {
      $a .= "<option value='$f[iMAGE]'";
      if ($findProfile['avatar_selected'] == $f['IMAGE']) $a .= " selected";
      $a .= ">$f[NAME]</option>";
   }

   return $a;
}



print "$openHTML";

ECHO <<<END

<P align="center"><FORM ACTION=$base_url/register.pro.php?game=$game METHOD=POST>
?>
<?php
require_once('recaptchalib.php');

// Get a key from http://recaptcha.net/api/getkey
$publickey = "XXXXXXXXXXXXXXXXXXX";
$privatekey = "XXXXXXXXXXXXXXXXXX";

# the response from reCAPTCHA
$resp = null;
# the error code from reCAPTCHA, if any
$error = null;

# was there a reCAPTCHA response?
if ($_POST["recaptcha_response_field"]) {
        $resp = recaptcha_check_answer ($privatekey,
                                        $_SERVER["REMOTE_ADDR"],
                                        $_POST["recaptcha_challenge_field"],
                                        $_POST["recaptcha_response_field"]);

        if ($resp->is_valid) {
                echo "You got it!";
        } else {
                # set the error code so that we can display it
                $error = $resp->error;
        }
}
echo recaptcha_get_html($publickey, $error);
?>
<?php
   <CENTER><FONT SIZE="-2" COLOR="#FF0000"><B>*</B></FONT><FONT SIZE="-1">
   - Information checked with a red star means that information<BR>
   is required to register here on Pet Game!</FONT>

   <P><TABLE CELLSPACING=0 CELLPADDING=0 WIDTH=400>
      <TR>
         <TD COLSPAN=2 BGCOLOR="$topAndBottomBG">
            <P><FONT SIZE="-1" COLOR="$topAndBottomText"><B>Account
            Information:</B></FONT></P>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Username:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT><FONT SIZE="-1"><BR>
            &#149; 16 Char. Limit<BR>
            &#149; a-z and 0-9 only!<BR>
            &#149; </FONT><A HREF="javascript:;" onclick="window.open('check_names.php?game=$game','checknames',config='height=250,width=250,menubar=no,resizable=yes,directories=no,scrollbars=no,status=yes,toolbar=no');     return false;"><FONT SIZE="-1">See
            if it's available!</FONT></A></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_username" VALUE="$remeber_username" SIZE=32 MAXLENGTH=16></P>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Display Name:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT><FONT SIZE="-1"><BR>
            &#149; 20 Char. Limit<BR>
            &#149; Same as username, Add spaces and CaPs!</FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_display_name" VALUE="$remember_display_name" SIZE=32 MAXLENGTH=20></P>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Password:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT><FONT SIZE="-1"><BR>
            &#149; CaSe SenSitIVe!</FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=password NAME="reg_pass1" SIZE=32></P>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Confirm Password:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT><FONT SIZE="-1"><BR>
            &#149; CaSe SenSitIVe!<BR>
            &#149; Must Match previous password!</FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=password NAME="reg_pass2" SIZE=32></P>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Referer:
            </B></FONT><FONT SIZE="-1"><BR>
            &#149; Did someone send you here? Give them credit! Plus pick up a few bonus points </FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="referer" SIZE=32 VALUE="$HTTP_COOKIE_VARS[referer]"></P>
         </TD>
      </TR>
   </TABLE>
   </P>

   <P><TABLE CELLSPACING=0 CELLPADDING=2 WIDTH=400>
      <TR>
         <TD COLSPAN=2 BGCOLOR="$topAndBottomBG">
            <P><FONT SIZE="-1" COLOR="$topAndBottomText"><B>Personal
            Information:</B></FONT></P>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130 HEIGHT=20>
            <P><FONT SIZE="-1"><B>Full Name:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_full_name" VALUE="$remember_name" SIZE=32></P>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=130 HEIGHT=20>
            <P><FONT SIZE="-1"><B>Email Address:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_email" VALUE="$remember_email" SIZE=32></P>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130 HEIGHT=20>
            <P><FONT SIZE="-1"><B>Location:</B></FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_location" VALUE="$remember_location" SIZE=32></P>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=130 HEIGHT=20>
            <P><FONT SIZE="-1"><B>Birthday:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_month" VALUE="$remember_month" SIZE=4> <INPUT TYPE=text NAME="reg_day" VALUE="$remember_day" SIZE=4> <INPUT TYPE=text NAME="reg_year" VALUE="$remember_year" SIZE=7>
            </P>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Gender:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT></P>
         </TD>
         <TD>
            <P>    <SELECT NAME=reg_gender SIZE=2>
               <OPTION value=1$rememberFemale>Female
               <OPTION value=2$rememberMale>Male
            </SELECT></P>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Avatar:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT></P>
         </TD>
         <TD>
            <P>    <img src="uploads/blank.gif" width=48 height=48 id="avatar">
            <br>    <SELECT NAME="avatar_selected" onChange="document.getElementById('avatar').src = 'uploads/' + this.value;">
END;
                echo getAvatarList($username);
ECHO <<<END
            </SELECT></P>
         </TD>
      </TR>

      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130 HEIGHT=20>
            <P><FONT SIZE="-1"><B>Signature:</B></FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_sig" VALUE="$remember_sig" SIZE=32></P>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Profile:</B></FONT></P>
         </TD>
         <TD>
            <P>    <TEXTAREA NAME=reg_profile ROWS=6 COLS=34 WRAP=virtual>$remeber_profile</TEXTAREA></P>
         </TD>
      </TR>
   </TABLE>
   </P>

   <P><FONT SIZE="-1">All information is provided here is safe. No
   personal information will ever<BR>
   be sold for any reason. Read our </FONT><A HREF="privacy.php"><FONT SIZE="-1">Privacy
   Policy</FONT></A><FONT SIZE="-1"> for more information.</FONT></P>

   <P><FONT SIZE="-1">By registering an account here you agree to all
   of our </FONT><A HREF="tos.php"><FONT SIZE="-1">Terms and
   Conditions</FONT></A><FONT SIZE="-1">!</FONT></P>

   <P><FONT SIZE="-1"><INPUT TYPE=submit NAME=Submit VALUE="Register My Account Now!!!"></FONT></CENTER>
</FORM></P>

END;

print "$closeHTML";
?>

 

Thank you!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.