By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,738 Members | 1,646 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,738 IT Pros & Developers. It's quick & easy.

REMOTE_ADDR via HTTPS

P: n/a
Pat
Hi,

I am having a small problem with a script that has to be requested via
https.

When I execute this normally I get my IP address printed on the
screen:

<?php
echo getenv('REMOTE_ADDR');
?>

However the same script executed over https gives me a completetly
different address.

How to I read the clients IP address via https?

Thanks for any advice.
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
pa********@yahoo.co.uk (Pat) writes:
I am having a small problem with a script that has to be requested via
https.

When I execute this normally I get my IP address printed on the
screen:

<?php
echo getenv('REMOTE_ADDR');
?>
You can also use $_SERVER['REMOTE_ADDR'].
However the same script executed over https gives me a completetly
different address.
Have you investigated what that address is? Does your browser have
a proxy configuration that makes it connect differently depending
on whether you're using HTTP or HTTPS? Have you run a packet sniffer
on your machine and/or the web server to see if that address really
is involved in the connection?
How to I read the clients IP address via https?


The above methods should work.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.