give one ip, find out which contry
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What's a good way to check for "close enough" floating-point equality?
#include<stdio.h> int f(int,int); int main() { printf("%d",f(20,1)); return 0; } int f(int n,int k) { if(n==0) return 0; else if(n%2)return f(n/2,2*k)+k; else return f(n/2,2*k)-k; } how this program is working and generating output as 9....?
main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); } what is the output?
7 Answers AMCAT, HCL, Ramco, Zycus Infotech,
print ur name 20,000 times without using inbuilt library functions like printf,scanf,gets,puts,getchar or putchar
program for comparing 2 strings without strcmp()
How to print India by nested loop? I IN IND INDI INDIA
. Write a program to get a string and to convert the 1st letter of it to uppercase
Explain what are compound statements?
Why do we use int main instead of void main in c?
Which of the following sorts is quickest when sorting the following set: 1 2 3 5 4 1) Quick Sort 2) Bubble Sort 3) Merge Sort
Find the middle node in the linked list?? (Note:Do not use for loop, count and count/2)
How can I make sure that my program is the only one accessing a file?