funnykitteh Posted January 12, 2013 Share Posted January 12, 2013 (edited) Hi, I'm adding an anti spam to my forum registration page. Here are instructions: http://research.micr...stallation.aspx I've already done step 1, 2, and 3 and it's working. However, I don't even know where to begin with step 4 so it's not working since spammers ignore javascript. Here is their example page: http://www.asirra.co...ice-PHP.php.txt but I don't know how to make it work with my registration page. Can someone fix this and tell me exactly how to make it work? Yes I'm looking to be spoonfed as I'm not a programmer. The first registration page has an age verification and I put asirra right below it so they can't continue without passing the challenge. Here is part of the registration php page: // ############################### start signup ############################### if ($_REQUEST['do'] == 'signup') { $current['year'] = date('Y'); $current['month'] = date('m'); $current['day'] = date('d'); if (!$vbulletin->options['allowregistration']) { eval(standard_error(fetch_error('noregister'))); } if ($vbulletin->userinfo['userid'] AND !$vbulletin->options['allowmultiregs']) { eval(standard_error(fetch_error('alreadyregistered', $vbulletin->userinfo['username'], $vbulletin->session->vars['sessionurl']))); } if ($vbulletin->options['usecoppa']) { if ($vbulletin->options['checkcoppa'] AND $coppaage) { $dob = explode('-', $coppaage); $month = $dob[0]; $day = $dob[1]; $year = $dob[2]; } else { $month = $vbulletin->input->clean_gpc('r', 'month', TYPE_UINT); $year = $vbulletin->input->clean_gpc('r', 'year', TYPE_UINT); $day = $vbulletin->input->clean_gpc('r', 'day', TYPE_UINT); } if (!$month OR !$day OR !$year) { // Show age controls $templatename = 'register_verify_age'; } else // verify age { if ($year < 1970 OR (mktime(0, 0, 0, $month, $day, $year) <= mktime(0, 0, 0, $current['month'], $current['day'], $current['year'] - 13))) { // this user is >13 $show['coppa'] = false; $templatename = 'register_rules'; } else if ($vbulletin->options['usecoppa'] == 2) { if ($vbulletin->options['checkcoppa']) { vbsetcookie('coppaage', $month . '-' . $day . '-' . $year, 1); } eval(standard_error(fetch_error('under_thirteen_registration_denied'))); } else { if ($vbulletin->options['checkcoppa']) { vbsetcookie('coppaage', $month . '-' . $day . '-' . $year, 1); } $show['coppa'] = true; $templatename = 'register_rules'; } } } else { $show['coppa'] = false; $templatename = 'register_rules'; } ($hook = vBulletinHook::fetch_hook('register_signup')) ? eval($hook) : false; $url =& $vbulletin->url; eval('print_output("' . fetch_template($templatename) . '");'); } Here is the page html <form action="register.php?do=checkdate" method="post" onsubmit="return (MySubmitForm() && checkform(this));"> <input type="hidden" name="do" value="checkdate" /> <input type="hidden" name="s" value="" /> <input type="hidden" name="securitytoken" value="guest" /> <input type="hidden" name="url" value="http://www.mywebsitenamehere" /> <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="70%" align="center"> <tr> <td class="tcat">Register at mywebsitenamehere</td> </tr> <tr> <td class="panelsurround" align="center"> <div class="panel"> <div style="width:70%" align="left"> <fieldset class="fieldset"> <legend>Age verification here</legend> <table cellpadding="0" cellspacing="3" border="0" align="center" width="100%"> <tr> <td> Month:<br /> <select name="month"> <option value="" selected="selected">-</option> <option value="01">January</option> <option value="02">February</option> <option value="03">March</option> <option value="04">April</option> <option value="05">May</option> <option value="06">June</option> <option value="07">July</option> <option value="08">August</option> <option value="09">September</option> <option value="10">October</option> <option value="11">November</option> <option value="12">December</option> </select> </td> <td> Day:<br /> <select name="day"> <option value="" selected="selected">-</option> <option value="01">1</option> <option value="02">2</option> <option value="03">3</option> <option value="04">4</option> <option value="05">5</option> <option value="06">6</option> <option value="07">7</option> <option value="08">8</option> <option value="09">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> </td> <td> Year:<br /> <input type="text" class="bginput" name="year" size="10" maxlength="4" value="" /> </td> </tr> </table> </fieldset> </div> </div> <div style="margin-top:6px"> <script type="text/javascript" src="http://challenge.asirra.com/js/AsirraClientSide.js"></script> <input type="submit" class="button" value="Proceed" " accesskey="s" /> </div> </td> </tr> </table> </form> Edited January 12, 2013 by funnykitteh Quote Link to comment https://forums.phpfreaks.com/topic/273068-php-form-for-image-anti-spam-need-simple-solution/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.