how to get address(country) by ip ??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mahmodm3
    New Member
    • Jan 2009
    • 10

    #1

    how to get address(country) by ip ??

    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)
  • PRR
    Recognized Expert Contributor
    • Dec 2007
    • 750

    #2
    Code:
    Response.Write(Request.UserHostAddress.ToString());
    you can also use Whatismyip

    Comment

    • tlhintoq
      Recognized Expert Specialist
      • Mar 2008
      • 3532

      #3
      Originally posted by mahmodm3
      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
      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.

      Comment

      • mahmodm3
        New Member
        • Jan 2009
        • 10

        #4
        i don't know how to start
        i need the code for my request

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

        Again, please stop posting in bold!
        --insertAlias, Moderator

        Comment

        • Curtis Rutland
          Recognized Expert Specialist
          • Apr 2008
          • 3264

          #5
          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.


          Comment

          • mahmodm3
            New Member
            • Jan 2009
            • 10

            #6
            ok thanks man
            i appricate yor help

            Comment

            Working...