Web Hosting Info

Search:

featured partner

The IP to Country Database

  Forum Topics : Wish List / Where to get the complete 'stats' script?
Submitted by surgh on Thu, 01/22/2004 - 09:50.
hi..im a new beginner
I just want to ask, where can i get the script of 'stats' like in this website
[at the left side]
(Your Location
-You are from....
-Your ip adress is....)-->all these
[i`ve dloaded ip-to-country.cvs.zip]
Also teach me how to insert the script to my web.....tq
email me:
waws_86@hotmail.com
Comment viewing options:
Select your preferred way to display the comments and click 'Save settings' to submit your changes.
PHP
Posted by bahadir on Wed, 01/28/2004 - 18:17.
www.phpfreaks.com will teach you how to write & use PHP scripts.
Stats with ip-to-country in asp
Posted by zocchi on Sat, 02/07/2004 - 03:57.
Dear fellow,
if you want to insert a file which use ip-to-country.cvs you can find it at this page: http://www.italiaweb.org/articoli/ip.asp
Inside the same site you can find a free complete program of stats with open source code.
see ya
Wrong country
Posted by KJK on Tue, 05/25/2004 - 12:35.
Hi:
I am trying to run a query against the ip to country database.

IP is 209.52.137.246
Converted IP is 3509881334

country is UNITED STATES - which is wrong - it should be canada.

I used the convert code off this site.
What am I doing wrong?
Attached is my code.

sIP = request("REMOTE_ADDR")
Function ConvertIP(sIP)
Dim arr
arr = Split(sIP,".")
ConvertIP = arr(0)*16777216 + arr(1)*65536 + arr(2)*256 + arr(3)
End Function
strIP = ConvertIP(sIP)
set myConnection = Server.CreateObject("ADODB.Connection")
myconnection.open Session("dbNet")
sqlString = "SELECT * FROM tblCountryIP WHERE IP_From<='" & strIP & "' AND IP_To>='" & strIP & "'"
set rsList1 = myConnection.execute(sqlString)
strCountry = rsList1("country_name")
Thanks in advance.
Kerstin