Tartarus Posted August 30, 2007 Share Posted August 30, 2007 I've been having an issue on my forum with someone using proxies to sign up and attempt to spam it. It's always the same person, and I know this because in the information, it states his locale to be "pt-BR". I was wondering if it were possible to deny anyone with the "pt-BR" system locale using PHP? I saw a PHP script on how to block Firefox, and was hoping maybe there was something along those lines that would work for users with certain system locales. I've tried looking around, and asking other people, but no one seems to know how, or if it's even possible. The Firefox script basically just checks your useragent, and if you're using Firefox, it directs you to another page stating why Firefox is blocked. I want to do something like that, but with the locale instead of the browser. Is it possible? Hopefully, this is in the right forum. Quote Link to comment https://forums.phpfreaks.com/topic/67340-denying-locales-with-php/ Share on other sites More sharing options...
Ninjakreborn Posted August 30, 2007 Share Posted August 30, 2007 I definitely do. I learned how from here... http://meshier.com/2007/04/21/blocking-visitors-by-country-using-php-mysql/ Quote Link to comment https://forums.phpfreaks.com/topic/67340-denying-locales-with-php/#findComment-337844 Share on other sites More sharing options...
Tartarus Posted August 30, 2007 Author Share Posted August 30, 2007 I definitely do. I learned how from here... http://meshier.com/2007/04/21/blocking-visitors-by-country-using-php-mysql/ Thanks, I'll look through that. Will that work on people using proxies, though? Quote Link to comment https://forums.phpfreaks.com/topic/67340-denying-locales-with-php/#findComment-337849 Share on other sites More sharing options...
Tartarus Posted August 30, 2007 Author Share Posted August 30, 2007 (Apparently, I can't edit my own posts) Yeah, I don't think that'll work on proxies. Besides, I don't think I can do the following: LOAD DATA LOCAL INFILE ‘ip-to-country.csv’ INTO TABLE netblocks FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘\r\n’ (startIP, endIP, c2, c3, name); My host doesn't seem to allow me access to a MySQL command line -- just phpmyadmin. Quote Link to comment https://forums.phpfreaks.com/topic/67340-denying-locales-with-php/#findComment-337879 Share on other sites More sharing options...
Ninjakreborn Posted August 31, 2007 Share Posted August 31, 2007 That's just importing a CSV file. You can go into phpmyadmin and use the "Import" feature to handle that for you. Quote Link to comment https://forums.phpfreaks.com/topic/67340-denying-locales-with-php/#findComment-338523 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.