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

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.