Re: IP Address Variable

From: Date: Wed, 14 Nov 2001 23:37:14 +0000
Subject: Re: IP Address Variable
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-74655@lists.php.net to get a copy of this message
It may not work, if you are running Windows PHP on your localhost at home. I'll bet you are trying to log getenv('REMOTE_HOST'). Been there done that. I use http://www.indigostar.com/microweb.htm to create a localhost to develop and debug and then upload to the server. (I pay for modem time.) I remember this not working if I used it at home. Are you sure you are not looking for getenv('REMOTE_HOST') in addition to getenv('REMOTE_ADDR'} You may want this instead. Here's some of my code: <?php $machine = getenv('REMOTE_HOST'); if(!strpos($machine, "collegesherbrooke.qc.ca")) { include "exterior.html"; }else{ echo "<FRAMESET cols=\"200,*\"> <FRAME src=\"index_tree.html\" name=\"treeframe\" > <FRAME SRC=\"college.html\" name=\"basefrm\"> </FRAMESET>"; } ?>

« previous php.general (#74655) next »