18.10.2016, 23:58
Hey guys, I am trying to make an Anti Advert, now this is my code:
How can I detect the port ? (:XXXX)
PHP код:
IsValidIP(ip[])
{
new num1, num2, num3, num4;
sscanf(ip, "p<.>iiii", num1, num2, num3, num4);
if(num1 > 255 || num2 > 255 || num3 > 255 || num4 > 255) return false;
if(num1 < 0 || num2 < 0 || num3 < 0 || num4 < 0) return false;
return true;
}