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

What is the difference between abs() and fabs() functions?

607


What is a program flowchart and how does it help in writing a program?

665


How can a program be made to print the name of a source file where an error occurs?

731


What is the use of ?: Operator?

669


Tell us something about keyword 'auto'.

666






I just typed in this program, and it is acting strangely. Can you see anything wrong with it?

563


Is array name a pointer?

607


How do you determine a file’s attributes?

602


What is the equivalent code of the following statement in WHILE LOOP format?

769


What is a pointer on a pointer in c programming language?

621


What are the advantages of using Unions?

642


What are the different categories of functions in c?

648


How can I swap two values without using a temporary?

618


The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.

1635


What is the difference between the = symbol and == symbol?

630