View Single Post
  #91  
Old 05-11-2020, 02:10 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: reCAPTCHA for X-Cart Classic

Tip of the day!

Dunno about you, but I frequently get contact us form submissions from bots using 'google' as the company name.

In v4.7.x, to stop them, edit /include/help.php

After...
Code:
// Check required fields $fillerror = !func_check_required_fields($contact, $current_area, 'contact_us');

Insert...
Code:
if (strtolower($contact['company']) == 'google') { $top_message['content'] = func_get_langvar_by_name('lbl_error'); $top_message['type'] = 'E'; func_header_location('help.php?section=contactus&mode=update&err=1'); }
Or just block IPs, or ranges of IPs outright using .htaccess
Code:
<Limit GET POST> order allow,deny deny from 5.188.210. allow from all </Limit>
If Google really is a client of yours, obviously use with caution
__________________
xcartmods.co.uk
Reply With Quote