Начало | IRC HELP | IRC ФОРУМ | HTML Chat | Вход

от: dzver (регистриран)

function IP_Match($network, $ip) {
$ip_arr = explode("/",$network);
$network_long=ip2long($ip_arr[0]);

$mask_long= pow(2,32)-pow(2,(32-$ip_arr[1]));
$ip_long=ip2long($ip);

if (($ip_long & $mask_long) == $network_long) {
return 1;
} else {
return 0;
}
}
$network="200.100.50.0/23";
$ip="200.100.51.55";
$ip2="200.100.52.2";

echo IP_Match($network, $ip);
echo IP_Match($network, $ip2);
?>

Мнения от посетители (1):
DJ_Halou12.01.05 22:12:28
Hmmmm
Mne mojah mnoo mnoo da go razbera tui no p1k za smetka na tova mnoo mi sa iska vse pak spoofovete na html da im fana hash-a i da si lovq IP-ta:P

Anonymous comments are temporary disabled

Най-цъкани за 2 дни


RO6AV_3 (127)


dzver (39)

putsabg (22)
C4 (21)
T0sh (20)
zhikata_stz (18)
C9H13N (17)
STOIL (16)
raul (15)
abat (14)
alberto77 (13)
CaRzE1N (13)
pEhLyOne (13)
AveNew (13)
Sladuranata88 (12)
KRALROFO (12)
VALAK (12)
butterfly (12)
sexi_spain_m (12)
Mephisto (12)
Pipince (11)
rushtothefloor (11)
Al (11)
Anarhiq13 (11)
PunK (11)
cpu (11)
scenndalos (10)
nnatali (10)
EXCELLEN1 (10)
zacona (10)
vzriviavam (10)
kikoltd (10)
extraspykid (10)
american_boy (10)
sexyromantichka (9)
Fredthered (9)
loto999 (9)
evgeni_sofiq (9)
romka_F (9)
aleksandrov (9)
  Copyright: ShakeIT IRC; dev: dzver; des: metala. Read blogs.  
eXTReMe Tracker