note 108002 rejected from function.getenv by danbrown
| From: | danbrown@php.net | Date: | Thu, 10 May 2012 17:59:12 +0000 |
| Subject: | note 108002 rejected from function.getenv by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-187698@lists.php.net to get a copy of this message | ||
Note Submitter: aladdin18 at hotmail dot com
----
Hi every one my name is AlAa
My problem with $_SERVER['remote_addr']
I'm not sure if I'm having a problem with the installation of PHP on the server or if
there's something that I'm not doing right in the code, but I am trying to capture the IP
address of anyone that is trying to log into a secure part of a site. Regardless of my IP address,
when I do:
Code:
echo $_SERVER['remote_addr'];
It returns '192.168.1.1'. This is the first time I've written code that is being used
on a Windows Server, so I don't know if that has anything to do with it.
I've run phpinfo(), and in the PHP Variables section, it shows
"_SERVER["REMOTE_ADDR"]" : 192.168.1.1. Does this mean that the php.ini file is
setup wrong, or am I missing something?
i am running my own server on windows 7 iis7.5 with php as fastcgi and i am behind a router with a
dynamic ip not static and i am using
http://www.no-ip.com/ that give me a link to my router and i am
opening 80 port in my router forwarding it to my id address 192.168.1.5 and i have tested a php file
that contains
<?php
echo $_SERVER['REMOTE_ADDR'];
?>
tested it using tor network that give me ip out of my network to test that file always give me the
same result 192.168.1.1 i am trying to get IP address of the visitor and i asked someone of my
friends to use this form it sends the same ip
i hope someone tells me what i am doing wrong and the solution for this problem
Thanks in advance