if ($REMOTE_ADDR=="127.0.0.1") { do something } elseif ($REMOTE_ADDR=="remote.somewhere.com") { do something else } else { eeks! its the end }
List of all the predefined variables: http://www.php.net/manual/en/language.variables.predefined.php -- Liz Fulghum -------------------------------------------------------------- http://www.lipstickalley.com/ - Be Popular! Want to learn PHP? http://webdeveloper.earthweb.com/scripting/article/0,,12014_900521,00.html -------------------------------------------------------------- "Jtjohnston" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > In perl I do something like this: > > if (!($ENV{'REMOTE_ADDR'} =~ /\b(132\.210)/)) > or > ... $ENV{'REMOTE_HOST'} > > PHP is not Perl. So how do I parse the user's remote address or host to > display one thing if IP = 127.0.0.1, another if = 209.247.2.3 another if > host = "remote.somewhere.com" else echo Blah"; > > John > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]