![]() |
I guess it would be possible to manually add IP ranges to the database by hand if you wanted to. What are the IP ranges in question?
|
Quote:
Well my isp is 66.229.216.150 which is c-66-229-216-150.hsd1.fl.comcast.net . Pretty popular isp. |
Another cool plugin might be to display one flag of each country currently view pages.
|
Actually, what I meant was the range you wanted added, not just the ip address.
Anyway, if we look up that address you gave in the ARIN database we see that it is registered to comcast as you say, and covers the following range: 66.229.0.0 - 66.229.255.255 (a class B range, a pretty big chunk) Before we do anything we need to convert this to numerical format. This is pretty simple, we just do it like this for the first part of the range: 66 * 256 * 256 *256 + 229 * 256 *256 + 0 * 256 + 0 This give us 1122304000 Now we do the same for the end of the address: 66 * 256 * 256 *256 + 229 * 256 *256 + 255 * 256 + 255 This gives us 1122369535 So we want to assign addresses between 1122304000 and 1122369535 to the US. But wait - are you really sure that this whole address range is in the US? How are you sure? Anyway, since this is your own database and nobody else's, you can do what you like. Use a tool (like PhpMyAdmin, or the SQL query function in the admincp) to look inside your database. Execute the following SQL command to give you any ranges inside the one you want like this: Code:
SELECT * FROM ip2country WHERE ip_from <= 1122369535 AND ip_to >= 1122304000 We see that a single result is returned: 1122320960 - 1122320995 - only 35 addresses? In the middle of that range assigned to portugal? Probably a mistake. Ok, so let's say you are absolutely sure that you want to add that big block in. You could make an SQL query like this: Code:
INSERT INTO ip2country (ip_from, ip_to, country_code2, country_code3, country_name) VALUES ('1122304000', '1122369535', 'us', 'usa', 'United States') Then you should be done. Anyone else can also use these instructions for another IP range if they like. Some useful links: http://ip-to-country.webhosting.info/forum (is full of spam, and isn't very useful, but these are the official forums for the database) http://www.arin.net/whois/ (for looking up IP address ranges) And of course - read install.txt and developer.txt in the installation archive for links, etc. |
By the way, if anyone is wondering if their OWN address is being found in the database, you can go to this page:
http://ip-to-country.webhosting.info/ They look up your address and display the country. When I visit the site I see the details. If you visit the site and don't see your country come up, your IP is not in the database. |
Now we just need someone to make a plugin which will allow the admins to pick countries to ban and then have it dynamically ban anyone that registers with a certain country :D
|
Quote:
|
Very nice, will u notify Country-IP-DB updates here?
|
Quote:
|
Quote:
Approximately one time per month! |
All times are GMT. The time now is 11:37 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|