vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   PHP - Identify User's Continent? (https://vborg.vbsupport.ru/showthread.php?t=104136)

firstrebel 01-01-2006 09:23 AM

Of use?

http://www.codeproject.com/asp/geoip.asp

Bob

akanevsky 01-01-2006 11:56 AM

Quote:

Well IP address blocks are reserved by various companies, which vary from area to area.

I suppose you could create a database in which it would analyze their ip and match it to a list of known IP address blocks, which would compare it to a list of blocks by country.
I ain't that crazy, there are pre-existing databases, so I don't see the point to reinvent the wheel. ;)

Quote:

Psionic Vision, if you need an ip->country db let me know i have one *bg*, there are which includes the shortname of country and longname, but no continent info, you could add id by yourself, if needed->post here.

best regards, soulfly
I already have an ip->country database which works perfectly.
BUT, post yours here, and I'll merge the two. :)

There's no download link :(

firstrebel 01-01-2006 12:19 PM

Quote:

Originally Posted by Psionic Vision
There's no download link :(

It's all under these headings:

Quote:

Prerequisite
(Updated 1.sep.03, new urls) You need the GeoIP database - http://www.maxmind.com/app/standard, and you need ADO 2.5 or later since GeoIP.asp uses the ADO Stream object to read the GeoIP database.

Installation
Download the GeoIP.dat database from MaxMind
http://www.maxmind.com/app/standard
Put GeoIP.asp, example.asp and GeoIP.dat in a catalog on your web server.
Test the installation by accessing the example.asp page
http://yourserver/path/example.asp
Bob

norwichcanary 01-01-2006 01:00 PM

Quote:

Originally Posted by Psionic Vision
I ain't that crazy, there are pre-existing databases, so I don't see the point to reinvent the wheel. ;)



I already have an ip->country database which works perfectly.
BUT, post yours here, and I'll merge the two. :)


There's no download link :(

http://ip-to-country.webhosting.info

There is also this database that i have used in the past :)

akanevsky 01-01-2006 01:13 PM

Thanks :) That db seems more updated that the one I have previously downloaded. Will have to make an importer, too, since it is updated often. ;) The only problem is, your DB does not contain the following info:
Capital, Currency, Continent.
But that's no problem, I'll have it merged with my database. ;)

I don't even know which is better.
http://www.ip2country.net/download.html -> Updated January 1st, 2006
http://ip-to-country.webhosting.info/node/view/6 -> Updated December 14, 2005

norwichcanary 01-01-2006 02:02 PM

Quote:

Originally Posted by Psionic Vision
Thanks :) That db seems more updated that the one I have previously downloaded. Will have to make an importer, too, since it is updated often. ;) The only problem is, your DB does not contain the following info:
Capital, Currency, Continent.
But that's no problem, I'll have it merged with my database. ;)

I don't even know which is better.
http://www.ip2country.net/download.html -> Updated January 1st, 2006
http://ip-to-country.webhosting.info/node/view/6 -> Updated December 14, 2005

Would you be willing to share your importer code please?

I changed the table to contain a countryid as opposed to all the information to save disk space.

akanevsky 01-01-2006 08:55 PM

Why do you need the imported code? But yes, maybe.
Are you the creator of that database?

EDIT: What do you use 3-symbol codes for?

EDIT2: Even though I made a converter, I decided to use a different database, that has separate files. The reason being is, I don't want to store ips in the database, and one csv file, even converted into an array, takes up megabyte or two. Which is too much to parse at once. The database I found isn't updated THAT often, but it has separate files, which is better in this case. Not too rare either, it has been updated in november :)


All times are GMT. The time now is 04:18 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01036 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete