By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,806 Members | 1,506 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,806 IT Pros & Developers. It's quick & easy.

how to get address(country) by ip ??

P: 10
hi
i need help
i want to get client ip address then according to this i will know his country.
please give me a code for this

edit by mod: don't post in bold
--insertAlias (moderator)
Jan 28 '09 #1
Share this Question
Share on Google+
5 Replies


Expert 100+
P: 750
PRR
Expand|Select|Wrap|Line Numbers
  1. Response.Write(Request.UserHostAddress.ToString()); 
  2.  
you can also use Whatismyip
Jan 28 '09 #2

tlhintoq
Expert 2.5K+
P: 3,525
@mahmodm3
The folks here aren't a free code writing service for your homework or job.

They are more than willing to help someone who has run into a snag on their project.

Please show what you have tried so far... provide code snippets of what you have already written and where it is failing to produce the results you expected and someone here can probably steer you in the right direction.
Jan 28 '09 #3

P: 10
i don't know how to start
i need the code for my request

and
this code : Response.Write(Request.UserHostAddress.ToString())
its just give me the ip but i need to get a country according the ip

Again, please stop posting in bold!
--insertAlias, Moderator
Jan 28 '09 #4

Curtis Rutland
Expert 2.5K+
P: 3,256
There is no built in way to decode where an IP is from. There are several sites offering a paid service for you to find out. Also, I believe that some companies sell lookup tables for you to put in your own database to do your own lookups.


http://www.google.com/search?hl=en&r...-revision&cd=5
Jan 28 '09 #5

P: 10
ok thanks man
i appricate yor help
Jan 28 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.