![]() |
Use JavaScript to display content based on ip address
New to any programming.
I am trying to display a specific picture to a visitor based on their IP Address. I.e., if the ip is x.xx.xxx.x display a picture of a dog. If the ip is y.yy.yyy.y display a picture of a cat, etc. Need to use server-side content. Thanks |
you should check out javax.servlet.http.HttpServlet.getRequestAddr()
ps. you cannot do it in javascript |
use can use tools at geolify.com t do what you need. it helps create geo targeted content for your website with minimal coding. you can also use it to do geo redirects based on ip address of visitors
|
First you need to get users ip, it's easier to get it in java in server , it's hard to get ip in javascript.
|
| All times are GMT +1. The time now is 08:31 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.