I have quite happily set up pac files using myIpAddress() as a function to resolve the local IP on my LAN to load balance my proxies.
I now need to use this function, or anything that works simply, to return the local ip so that I can change the content of my media server to deliver hq video to high bandwidth pcs while delivering lower quality to the area offices which are on a different subnet. Searching has proved futile.
The outcome is to have something that allows a web page to display http://mediaserver/x to one ip range and http://mediaserver/y to another. I really don't care what WAN address they have, it's an intranet.
My pac file works just fine.
What do I need to do to get the same functionality in a web script that will work on win32, OSX and sun machines?