SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    May 2004
    Location
    Planet Earth
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Show currency depending IP address

    Hi

    Is there any way to show automatically the currency price of a product depending the IP address where the buyer is located with php?

    is this a good idea anyway?

    I want to sell something in different countries and I was thinking if it is better to automatic detect the price depending her location. Do you think that is better instead to let the people choose their country first and then display the price?

    Thanks for any comment !

    Cheers
    "The Internet ? Is that thing still around ?"

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use an ip to location database like geoip.
    You could also use the accept-language http header the browser will likely send you. I'm not sure if you plan to localize your text for different languages, but the accept-language is often used for that.

    Regardless, make it very easy to choose something different. People travel, and use proxys, and databases and browsers settings can just be plain wrong.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •