give one ip, find out which contry

Answers were Sorted based on User's Feedback



give one ip, find out which contry..

Answer / sunil

Hi! Ranjita

Are you online?

Is This Answer Correct ?    1 Yes 0 No

give one ip, find out which contry..

Answer / sunil

You can use simple ASP script to lookup country code/name
from any ip addresses

Is This Answer Correct ?    0 Yes 0 No

give one ip, find out which contry..

Answer / ranjita

hi sunil

can you give me the code for that or can you explain in detail

Is This Answer Correct ?    0 Yes 0 No

give one ip, find out which contry..

Answer / 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

More C Interview Questions

Input is "Jack and jill went up a hill" To print output is 1-letter word(s)-1 2-letter words-1 3-letter words-1 4-letter words-4

1 Answers   Mind Tree, TCS,


will u give me old quesrion papers for aptitude for L & t info tech?

1 Answers   Hindustan, L&T,


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

0 Answers   L&T,


what will be the output of this program? #include<stdio.h> #define cube(x) x*x*x void main() { int i,j=5; i=cube(j+3); printf("i=%d",i); }

6 Answers   IBM,


What library is sizeof in c?

0 Answers  






Explain the concept and use of type void.

0 Answers  


i=10,j=20 j=i,j?(i,j)?i:j:j print i,j

1 Answers   CSC,


Whats wrong with the following function char *string() { char *text[20]; strcpy(text,"Hello world"); return text; }

3 Answers   Qualcomm,


What is pointer to pointer in c language?

0 Answers  


Explain zero based addressing.

0 Answers  


What are the types of assignment statements?

0 Answers  


What is the purpose of realloc()?

0 Answers  


Categories