On Saturday 13 July 2002 13:45, Liam MacKenzie wrote: > If I enter 192.168.0.13 (My IP) it works, I'm allowed in and any other IP > isn't. > However, I need to grant access to this whole network, not just me. So I > need 192.168.0.* to be able to access it, everyone else should get "Access > Denied" > > So I need to know how to write this bit: > $localip = "192.168.0.13"; > so that it's the network, not just me. > > I tried these but they didn't work: > $localip = "192.168.0.0"; > $localip = "192.168.0.*"; > $localip = "192.168.0.0/24";
In this particular case all you need to do is check that the ip address ($REMOTE_ADDR) begins with "192.168.0.". So look in the manual to see which of the string function(s) you need to perform this comparison (probably strstr()). -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Every improvement in communication makes the bore more terrible. -- Frank Moore Colby */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php