RE: [PHP] Restrict access per IP Address

From: Date: Fri, 16 Feb 2001 03:31:13 +0000
Subject: RE: [PHP] Restrict access per IP Address
Groups: php.general 
Request: Send a blank email to php-general+get-40088@lists.php.net to get a copy of this message
if(getenv('REMOTE_ADDR')==$my_IP) $LetMeIn = 1; else unset($LetMeIn); Cheers, Maxim Maletsky -----Original Message----- From: Alexander Wagner [mailto:wagner@globalpark.de] Sent: Thursday, February 15, 2001 8:31 AM To: PHP Mailing List Subject: Re: [PHP] Restrict access per IP Address Karl J. Stubsjoen wrote: > Okay, last one for the day! How do you query the clients IP address? > We have a site in development, and I want to restrict access to > people coming in from certain IP addresses. > Really, all I need to do is query the IP address, I can code the rest > of it. $remote_ip = getenv('REMOTE_ADDR'); should work. There are other ways, but this one should be the safest. regards Wagner -- Three may keep a secret, if two of them are dead. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#40088) next »