CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Java and JSP (http://www.codingforums.com/forumdisplay.php?f=54)
-   -   Use JavaScript to display content based on ip address (http://www.codingforums.com/showthread.php?t=146747)

NoahT 08-15-2008 08:00 PM

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

shyam 08-16-2008 02:34 PM

you should check out javax.servlet.http.HttpServlet.getRequestAddr()

ps. you cannot do it in javascript

vram 05-15-2013 01:14 PM

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

bigball 05-17-2013 07:07 AM

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.