View Full Version : Country Restriction
Like Habbo does in beat and only lets certain countrites
How do i set that up so i only wnon't certian counries on my site
Mentor
10-07-2005, 02:02 AM
why would you want to?
you would just use htaccess files, and disable any ip useing a certain contry code, they all have a number for a contry in it, athogh im not a 100% on what it is, you need to check a contry to ip db.
you could also only let an ip load files if it is from a certain contrys ip as well.
Steven.
10-07-2005, 02:27 AM
that's quite intresting Mentor, i have never heard of that :o
Mentor
10-07-2005, 02:32 AM
that's quite intresting Mentor, i have never heard of that :o
Its how the stat programs determen wich contry people are from :D
the wombats
10-07-2005, 02:33 AM
mentor needs a promotion Lol, he is so helpful with stuff like this and that, he must be the one that helps most out of the webpage designers
mentor so do u know the code
JoeComins
10-07-2005, 11:03 AM
mentor so do u know the code
He's just said he doesn't know it.
Mentor
10-07-2005, 02:51 PM
Welll you can get the TW ip to contry db from this link ftp://ftp.tracewatch.com/ip2c.zip (download) then look all the stufff up from that.
or for more info
http://www.tracewatch.com/doc/ip_to_country.php
http://ip-to-country.webhosting.info/
Then the .htaccess part is pretty simple
Ok to block everyone, then only allow a certain contrys ip for exsample this would be the content
order deny,allow
deny from all
allow from 00.00.000.00
allow from 00.000.00.
OK the first one is blocking a full ip, indevdicauly, the second one is blocking any ip wich machs the first part
00.000.00.
blocks 00.000.00.01
00.000.00.00
00.000.00.89
or any other thingy, just end with a period, and after it becomes varibel :D
I think thats a bit compilcated
it allways thinks i am from america when i am in the uk it might be that AOL's proxy servers are in america if that is the case then i dont think it is a good idea to block ip codes as you might block ppl from the contry u allowed
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.