473,322 Members | 1,268 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

REMOTE_ADDR via HTTPS

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
1 3526
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: bawar | last post by:
I want to put a script on my site that shows how many users are online on my site. I found one, and that is shown below. It also shows a log with the IP-addresses of those visitors. Buuut... the...
7
by: deko | last post by:
Why is $_SERVER returning multiple IP Addresses? Actually, I'm not sure if it's $_SERVER -- or which if/else statement -- that's the problem, but what I'm getting as a value for $visip looks...
5
by: Sachin Singhal | last post by:
Hi All, I am in a bit of fix. In one of my setup, the server REMOTE_ADDR(url = Request.ServerVariables("REMOTE_ADDR")) does not work, itgives a IP address but the wrong one. It does not give the...
2
by: xarrisx | last post by:
I have a web server with a firewall. The problem is that when i use request.servervariables("remote_addr") the ip i get is my server's ip. Is there any other way to retrieve my visitor's ip? ...
7
by: Jason | last post by:
Hi, The javascript in my page is not working, itstead of alerting me the ip address, it alerts me with string "<!--#echo var="REMOTE_ADDR"-->". var ip = '<!--#echo var="REMOTE_ADDR"-->';...
6
by: aabrahao | last post by:
Hi, In IIS 6, windows 2003 with php 4.3.11, the code REMOTE_ADDR does not show the IP, but the same page in apache2triad shows the IP. I tried <? $ip = getenv("REMOTE_ADDR"); print $ip; ?>...
4
by: ojorus | last post by:
Hi. I have a problem when I use the $_SERVER. I'm testing a script, and the strange thing is that remote_addr returns an ip-address only sometimes, and not always. Why can that be? Are there any...
3
by: Frank Moyles | last post by:
What is the equivalent for retrieving server side variables? For example in PHP, one such predefined variable is: $_SERVER
2
by: Henry Stock | last post by:
I don't seem to understand how to use the value: Request.ServerVariables("remote_addr") I am trying to pass the ip address of a sending web client in the body of an email message. When I...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.