27.08.2017, 12:56
Also you can't use strval on an IP. At most it will return the first octet.
If you want the numerical value of an IP then you need something like this:
If you want the numerical value of an IP then you need something like this:
PHP код:
inet_aton(ip[])
{
new octets[4];
sscanf(ip, "p<.>a<i>[4]", octets);
return octets[0] << 24 | octets[1] << 16 | octets[2] << 8 | octets[3];
}