Commit f103eaf1 authored by Vitaly Lipatov's avatar Vitaly Lipatov

check /24 net instead IP

parent f66eb8f2
...@@ -56,7 +56,8 @@ function get_client_ip() { ...@@ -56,7 +56,8 @@ function get_client_ip() {
function calc_hash($domain, $ip, $email) function calc_hash($domain, $ip, $email)
{ {
return md5($domain.$ip.$email); $net = preg_replace( '_(\d+)\.(\d+)\.(\d+)\.(\d+)$_', '$1.$2.$3', $ip );
return md5($domain.$net.$email);
} }
$email = isset($argv[1]) ? $argv[1] : $_GET['email']; $email = isset($argv[1]) ? $argv[1] : $_GET['email'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment