public function Cleantalk::net_match in Anti Spam by CleanTalk 8.3
From http://php.net/manual/en/function.ip2long.php#82397
File
- src/
lib/ Cleantalk/ Antispam/ Cleantalk.php, line 649
Class
- Cleantalk
- Cleantalk class create request
Namespace
Drupal\cleantalk\lib\Cleantalk\AntispamCode
public function net_match($CIDR, $IP) {
list($net, $mask) = explode('/', $CIDR);
return (ip2long($IP) & ~((1 << 32 - $mask) - 1)) == ip2long($net);
}