<% on error resume next dim u,yy,pop,cap,vn,reg,tm,conid,conshort,conlong,cr,crc,ns,np,la,lo,mp u=trim(Request.QueryString("ip")) ipaddress =u'trim(Request.QueryString("ip")) if trim(u)="" then u=trim(Request.QueryString("ip")) ipaddress =trim(Request.QueryString("ip")) end if ipno = Dot2LongIP(ipaddress) yy=request.servervariables("PATH_INFO") if trim(yy)="" then yy ="others" Dim conn, rs, sql, accessdb, strconn,x,y,z,gtt ' select MS-Access database using DSNless connection accessdb = server.mappath("ipcountry.mdb") strconn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" strconn = strconn & accessDB & ";" Set conn = Server.CreateObject("ADODB.Connection") conn.open strconn strsql = "SELECT * FROM ipcountry WHERE " & ipno & " BETWEEN ipFROM AND ipTO" Set rs = conn.execute(strsql) x=rs("countrySHORT") z="../flags/" & x & ".gif" y=rs("countryLONG") conshort=rs("countrySHORT") conlong=rs("countryLONG") If rs.EOF Then z="../flags/a.gif" end if rs.close set rs = nothing conn.close Set conn = nothing '''''''''' get the country other information accessdb = server.mappath("ipcountry.mdb") strconn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" strconn = strconn & accessDB & ";" Set conn = Server.CreateObject("ADODB.Connection") conn.open strconn strsql = "Select * from con where iso2='" & x & "'" Set rs = conn.execute(strsql) reg=rs("mapreference") cap=rs("capital") cr=rs("currency") crc=rs("curnencycode") ns=rs("nationalitysingular") np=rs("nationalityplural") conid=rs("countryid") pop=rs("population") mp=rs("fips104") If rs.EOF Then pop="N/A" reg="N/A" cap="N/A" cr="N/A" crc="N/A" ns="N/A" np="N/A" end if rs.close set rs = nothing conn.close Set conn = nothing '''''''''' get the time zone other information accessdb = server.mappath("ipcountry.mdb") strconn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" strconn = strconn & accessDB & ";" Set conn = Server.CreateObject("ADODB.Connection") conn.open strconn strsql = "Select * from Cities where countryid=" & conid Set rs = conn.execute(strsql) tm=rs("timezone") la=rs("latitude") lo=rs("longitude") If rs.EOF Then tm="N/A" end if rs.close set rs = nothing conn.close Set conn = nothing ' Convert dotted IP address into IP number in long Function Dot2LongIP (ByVal DottedIP) on error resume next Dim i, pos Dim PrevPos, num If DottedIP = "" Then Dot2LongIP = 0 Else For i = 1 To 4 pos = InStr(PrevPos + 1, DottedIP, ".", 1) If i = 4 Then pos = Len(DottedIP) + 1 End If num = Int(Mid(DottedIP, PrevPos + 1, pos - PrevPos - 1)) PrevPos = pos Dot2LongIP = ((num Mod 256) * (256 ^ (4 - i))) + Dot2LongIP Next End If End Function conlong2=replace(conlong," ","_") %>
IP Address IP Address Location IP Lookup Information  IP Address IP Address Location IP Lookup Information
 

IP Address Location IP Address IP Address Location IP Lookup Information


 

Free IP2Stats Code

 

To add this box in your website

 
Copy and paste this code between <body> and </body> tags in your web page.
 
   
  Or to show visitors flag of there countries like this:
IP2Stats.com Read more information about your country
  Copy and paste this code between <body> and </body> tags in your web page.
 
   
  Or to show visitors flag and country name like this:
 
  Copy and paste this code between <body> and </body> tags in your web page.
 
 
Edit SWF

 
HOME Website creation Technical help Compress SWF LOGIN Flash web site SIGN UP! Multimedia software development Flash Software license PRIVACY POLICY Create Virtual Serial Port Virtual COM Port CONTACT US
E-mail: info@IP2stats.com

© 2004 Ip2stats.com, All Rights Reserved.