There are many services, both Free & Commercial, which provide you the geographic data of the visitors to your website. We will however use the free IP-Country database provided by
http://ip-to-country.webhosting.info. This database is available in the CSV format & can be imported into other databases like MS-Access, MS-SQL, MySQL, etc. Since we will be using ASP & MS-Access, we will thus download this csv database & import it into an MS-Access database.
The MS-Access database containing the records from the downloaded csv database is attached with this tutorial. The full code used in this tutorial is at the end.
So after importing the CSV file into an MS-Access database, we name the database as
ip2country & the table as
ip2c.
Now, there are 5 columns in our table
ip2c, namely, ip_from, ip_to, co_code2, co_code3 & co_name.
Instead of storing IP Address, which are in format xxx.xxx.xxx.xxx, this database has IP number ranges. The
ip_from marks the beginning of range &
ip_to ends it. The
co_code2 column has the 2Digit country code &
co_code3 has 3Digit Country Code. The column
co_name has the full country name.
Now we will proceed to writing the ASP code.
Extracting the Country from the IP Address:- How To?
MySQL books
-
Dynamic Web Application Development with ASP.Net (Computing)
This is the latest book from Cengage Learning on "Dynamic Web Application Development with ASP.NET...
MySQL forum discussion
-
MS Edge in Kiosk mode
by kiwi.automate (0 replies)
-
CorelDRAW VBA: cdrTraceLineDrawing FAILS, producing single linear path instead of Centerline trace?
by dancemanj (0 replies)
-
vb script to copy specific file to another computer via local area network
by talekeshav (0 replies)
-
deobfuscate malicious vbscript
by ru5ty (0 replies)
-
How to add parameter into XML file using VBScript
by deepak_solanki19 (0 replies)
MySQL podcasts
-
Hanselminutes: Startup Series: Buying an Existing Small Company or Online Application
Published 8 years ago, running time 0h34m
Scott talks to Rob Walling about how he purchases small niche products and companies online and revitalizes them. He recently purchased an existing product that consisted of a 300 gig database and tens of thousands of lines of Classic ASP. How did he know it was valuable? What's next?
Comments