give one ip, find out which contry

Answer Posted / sunil

ASP Script Usage and Sample - you may use the following
features independently

1. Create and destroy the component

' Create an instance of ActiveTarget object
Set ActiveObj = Server.CreateObject("ACTarget.IPGEO")

' Free the instance after use
Set ActiveObj=nothing

2. Get the client visitor's ip address

'Return the ip address of the current visitor
ClientIP = ActiveObj.ClientIP

3. Detect client visitor's country code

'Return the two letters iso country codelike us, uk, jp etc.
VisitorCountry= ActiveObj.ClientRegion

4. Detect client visitor's full country name

'Return full country name like United States, United Kingdom
etc.
VisitorFullCountry = ActiveObj.ClientFullRegion

5. Look up the country code from an ip address

'Custom IP address to two letters country code lookup
IP="150.48.244.170"
IPCountry = ActiveObj.Lookup(CStr(IP))

or

IPCountry = ActiveObj.Lookup("150.48.244.170")


6. Look up the country name from an ip address

'Custom IP address to full country name lookup
IP="150.48.244.170"
IPFullCountry=ActiveObj.FullLookUp(CStr(IP))

7. Resolve a host/domain name to ip address

IP=ActiveObj.DNSLookup("www.microsoft.com")

8. Convert country code to full country name

CountryName=ActiveObj.RegionCodeToName("CA")

9. Check the current status of the component

'It will output ActiveTarget DLL version, ip-country
database version,
' current status, last loaded time, self-test etc.

Response.Write ActiveObj.Version


10. Reload the database when updated

'Only when you get new version of ip-country database, then
use this method to load the new database without restarting
your server or IIS.

ActiveObj.ReloadLibrary

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

1858


Why should I use standard library functions instead of writing my own?

678


What is the difference between memcpy and memmove?

608


write a c program in such a way that if we enter the today date the output should be next day's date.

1685


What is the difference between near, far and huge pointers?

630






Are there constructors in c?

600


what is the difference between class and unio?

1866


What are the types of operators in c?

616


What is main () in c?

590


Can you define which header file to include at compile time?

593


How the c program is executed?

638


What is a volatile keyword in c?

646


What is a shell structure examples?

596


Explain is it better to bitshift a value than to multiply by 2?

720


How many keywords are there in c?

596