Strval segfault?
#3

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:
PHP код:
inet_aton(ip[])
{
    new 
octets[4];
    
sscanf(ip"p<.>a<i>[4]"octets);
    
    return 
octets[0] << 24 octets[1] << 16 octets[2] << octets[3];

Reply


Messages In This Thread
Strval segfault? - by Misiur - 27.08.2017, 12:11
Re: Strval segfault? - by Misiur - 27.08.2017, 12:30
Re: Strval segfault? - by Vince - 27.08.2017, 12:56
Re: Strval segfault? - by Misiur - 27.08.2017, 13:04

Forum Jump:


Users browsing this thread: 1 Guest(s)