What is the average cost of unique visitor to a website?

How do I change the look of my website based on the IP address of the visitor?

  • When a visitor comes to my website I like the experience to be personal. So, as an example, I would like for my site to say "Happy Friday." if it's Friday or "Happy Sunday." if the visitor enters the site on Sunday. The hard part is that I'd like to be able to use the location of the visitor's IP address to say the message in their country's language. So, for example, if the IP is from a Spanish speaking country, then I'd like the message to display "Feliz Viernes." if they visited the site on Friday. I'm not too worried about the time it takes to load the site because it's a one page, very light website.

  • Answer:

    Determine where this location is, and what language they speak there Noooooooo! Don't use geotargeting for language. The fact that someone happens to be in a particular location is no indicator of the language they speak.

Dave Dazzler at Quora Visit the source

Was this solution helpful to you?

Other answers

If you want to program it all yourself, your program would consist of three components: Check the user's IP address (this may not always be correct, because some users will be browsing via proxy servers etc) Use geo-location to 'translate' the IP address into a location (This, also, won't always be correct, because some users' ISPs will show as the nearest city, or even a completely different coty. Mostly, the country will be correct) Determine where this location is, and what language they speak there Process all of the above, and show the message on your site. All of the above can be done server-side with any of the programming languages used on-line (PHP etc), but it may be easier to do it with Javascript; check what language preference the user has based on their browser settings, and then use their system clock to select your message.

Haje Jan Kamps

Something like session.js might be what you're looking for - https://github.com/codejoust/session.js

Rick Butterfield

I'm looking to market to multiple areas, rural, suburban, and urban.  I would like to have the site interface change based on GPS data provided.  If no GPS data is available, then I'd like the template to change based on IP.  Of course, one caveat is that if someone has started a session in x location and they are using a mobile device, the template being used initially needs to "stick" until they have logged out.  Also, somehow, the bookmarks would need to match with the template used at the time the bookmark was created. The areas currently being marketed to, especially the rural ones, are very local minded, so throwing a design that appears centered around the city really wouldn't work, in my opinion, as effectively, as one that's rural.  Likewise, somebody in the middle of a city my not be as inclined to work with someone from the hills.

Robert Elder

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.