note 18627 deleted from function.strstr by sander

From: Date: Sun, 12 May 2002 15:55:13 +0000
Subject: note 18627 deleted from function.strstr by sander
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-30544@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.*"

« previous php.notes (#30544) next »