note 108002 added to function.getenv

From: Date: Wed, 21 Mar 2012 15:31:39 +0000
Subject: note 108002 added to function.getenv
Groups: php.notes 
Request: Send a blank email to php-notes+get-186758@lists.php.net to get a copy of this message
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 ---- Server IP: 69.147.83.197 Probable Submitter: 41.236.177.130 ---- Manual Page -- http://www.php.net/manual/en/function.getenv.php Edit -- https://master.php.net/note/edit/108002 Del: integrated -- https://master.php.net/note/delete/108002/integrated Del: useless -- https://master.php.net/note/delete/108002/useless Del: bad code -- https://master.php.net/note/delete/108002/bad+code Del: spam -- https://master.php.net/note/delete/108002/spam Del: non-english -- https://master.php.net/note/delete/108002/non-english Del: in docs -- https://master.php.net/note/delete/108002/in+docs Del: other reasons-- https://master.php.net/note/delete/108002 Reject -- https://master.php.net/note/reject/108002 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186758) next »