Начало | 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 (114)


STOIL (18)

T0sh (18)
dzver (18)
C4 (17)
camoteh (14)
Excess (13)
alf_ot_melmak (13)
RedDevil (13)
Al (12)
RhapsodY (12)
Casper (12)
CRASH (12)
ivaylo780613 (11)
krasiva (11)
Click (11)
dafa (10)
Siana__________ (10)
^ (10)
LZ (10)
Pin2 (10)
Daemon (10)
pme6ko (9)
jenata_kotka (9)
SHEMET- (9)
sniper (9)
kaka_qka_ (9)
^italianeca^20 (9)
ragazzo_bello (9)
zina_vn (9)
Berbara (9)
D_Beckham (9)
Faces`boY (9)
vladko (9)
SkyWolf (9)
Mast3rX (9)
sexybaby (9)
JaG (9)
KePeHcKu (9)
  Copyright: ShakeIT IRC; dev: dzver; des: metala. Read blogs.  
eXTReMe Tracker