Re: Restricting access using IPs

From: Date: Sat, 13 Jul 2002 05:49:10 +0000
Subject: Re: Restricting access using IPs
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-107486@lists.php.net to get a copy of this message
On Saturday 13 July 2002 13:10, Liam MacKenzie wrote: > Hey all, I'm looking to deny access to all IPs except those that fall into > a specific IP range. 192.168.0.* in this case. > Am I missing something out of this code, it don't work too well ;-) HOW doesn't it work too well? It displays a picture of a naked guy instead of the naked girl that you was expecting? > <? > $localip = "192.168.0.13"; > if ($REMOTE_ADDR == $localip) { > ?> > > Allowed! > > <? > } > else { > ?> > > Denied! > > <? > } > > ?> -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* GOOD-NIGHT, everybody ... Now I have to go administer FIRST-AID to my pet LEISURE SUIT!! */

« previous php.general (#107486) next »