|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by bennybutler in JavaScript, Asynchronous Javascript and XML (AJAX)
My apache server is behind a load balancer that, when using SSL only gives me the IP address of the load balancer, not the client. When NOT using the SSL I can get the IP address from x-forwarded-for header (or something like that.) I'm looking for a javascript that I can run on an SSL page that will pull the correct IP off of a non-ssl page. My non ssl page would only present the IP address, something like
http://www.domain.com/ip.php will be:
<? echo $_SERVER['x-forwarded-for'
];?>
And for testing , I just want to alert('$ip') and get the IP address spit out.
Oh, and it shouldn't throw up any "do you only want to view secure parts in the page" errors.
Any ideas?
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625