note 32586 deleted from function.ip2long by cmb

From: Date: Sun, 13 Oct 2019 07:46:05 +0000
Subject: note 32586 deleted from function.ip2long by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212604@lists.php.net to get a copy of this message
Note Submitter: rbsmith ---- Yet another word on IP_Match here is the complete functions as described by php-net at dreams4net dot com on 08-Aug-2002 09:31 <?php # determine if an IP address is within # a particular network with mask function IP_Match($network, $mask, $ip) { $ip_long=ip2long($ip); $network_long=ip2long($network); $mask_long=ip2long($mask); if (($ip_long & $mask_long) == $network_long) { return true; } else { return false; } } ?> Thank you, it is simple, fast, and best of all works!

« previous php.notes (#212604) next »