Wednesday, January 9, 2008

know your IP & country

<a href="http://pingme.info/">http://pingme.info/
which will tell you your I.P. & country
You can use the following piece of ASP code to get country details. Sending AJAX CALL

<%strXml=""set XmlHttp=Server.CreateObject("Microsoft.XMLHTTP")XmlHttp.open "POST","http://pingme.info/pingme.asp",falseXmlHttp.send(strXml)
strCountryShort=XmlHttp.responsexml.documentElement.getElementsByTagName("countryshort").Item(0).TextstrCountryLong=XmlHttp.responsexml.documentElement.getElementsByTagName("countrylong").Item(0).TextstrCountry=XmlHttp.responsexml.documentElement.getElementsByTagName("countryname").Item(0).TextResponse.Write("Country Short:"&strCountryShort&"
")Response.Write("Country Long:"&strCountryLong&"
")Response.Write("Country Name:"&strCountry&"
")%>

No comments: