Jump to content

Denying locales with PHP.


Tartarus

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/67340-denying-locales-with-php/
Share on other sites

(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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.