...

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



s10xtremenlow
09-26-2011, 03: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.

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

http://www.javascriptkit.com/jsref/location.shtml

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

s10xtremenlow
09-28-2011, 12:29 PM
anyone?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum