note 18627 added to function.strstr

From: Date: Wed, 30 Jan 2002 00:04:43 +0000
Subject: note 18627 added to function.strstr
Groups: php.notes 
Request: Send a blank email to php-notes+get-25989@lists.php.net to get a copy of this message
This may or may not be useful to you .. This one line will get the IP subnet from an IP address, and replace the last octet/field (I obviously don't know the name of it :|) with an asterisk. Let's suppose the IP address of the visitor is 205.215.24.184 $ipsub = strrev(strchr(strrev(getenv("REMOTE_ADDR")), ".")) . "*"; $ipsub will then equal "205.215.24.*" -- http://www.php.net/manual/en/function.strstr.php http://master.php.net/manage/user-notes.php?action=edit+18627 http://master.php.net/manage/user-notes.php?action=delete+18627 http://master.php.net/manage/user-notes.php?action=reject+18627

« previous php.notes (#25989) next »