% Response.Buffer = TRUE %>
GeoIP Test
GeoIP Test
<%
if Request.Form("values") = "Test Values" then
hostname = "www.yahoo.com"
else
hostname = Request.Form("hostname")
end if
if Request.Form("submit") = "Submit" then
set geoip = Server.CreateObject("GeoIPCOM.GeoIP")
geoip.loadDataFile("C:\Program Files\GeoIP\GeoIPDemo.dat")
country_code = geoip.country_code_by_name(hostname)
country_name = geoip.country_name_by_name(hostname)
Response.Write("| Results |
")
Response.Write("| Hostname | " + hostname + " |
")
Response.Write("| ISO 3166 Country Code | " + country_code + " |
")
Response.Write("| Full Country Name | " + country_name + " |
")
Response.Write("
")
end if
%>