note 17658 added to function.strncmp
| From: | bswami1 at yahoo dot com | Date: | Tue, 18 Dec 2001 19:23:37 +0000 |
| Subject: | note 17658 added to function.strncmp | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-23142@lists.php.net to get a copy of this message | ||
To restrict access to applications to allowed IP addresses, I plan to:
if (!strncmp ($REMOTE_ADDR, $allowed, strlen ($allowed) ) )
{
echo "You are allowed";
}
else
{
echo "You are not allowed";
}
where as of now, $allowed has to be hard coded.
HTH
--
http://www.php.net/manual/en/function.strncmp.php
http://master.php.net/manage/user-notes.php?action=edit+17658
http://master.php.net/manage/user-notes.php?action=delete+17658
http://master.php.net/manage/user-notes.php?action=reject+17658