I want to convert ip address to a digital, like this:
PHP Code:
new ip[16],str[12],str1[4],str2[4],str3[4],str4[4];
get_user_ip(ip,15,1);
split(ip, str1, 3, str, 12, ".");
split(str, str2, 3, str, 12, ".");
split(str, str3, 3, str4, 3, ".");
new intip = str_to_num(str1) * 256 * 256 * 256 + str_to_num(str2) * 256 * 256 + str_to_num(str3) * 256 + str_to_num(str4);
result = dbi_query(sql,"SELECT `address` FROM `cs_ipdata` WHERE (`ipstart` <= '%d') And (`ipend` >= '%d')",intip,intip);
But error, please teach me !