View Full Version : Embed Videos - different URL based on Source IP

09-26-2011, 04:57 PM
I want to be able to display an embedded video on a web page but i want the URL to be different based on the source IP visting the web page.

Can this be done in javascript?

Example: If someone from inside our network (one IP address on the outside) visits our external web page (hosted externally) visits a web page with one of the embedded videos the URL and code will serve up a locally hosted video. (WMV format)

If someone outside our network (any other IP) visits our web site, they'll see embedded videos hosted on YouTube.

09-26-2011, 05:06 PM
You can use the location object:


09-26-2011, 07:09 PM
Do you happen to have an example of code?

09-28-2011, 01:29 PM