Raised This Month: $ Target: $400
 0% 

How to define a large integer?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
wwzw
Member
Join Date: Feb 2009
Old 11-02-2011 , 08:38   How to define a large integer?
Reply With Quote #1

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(ipstr13str12".");
 
split(strstr23str12".");
 
split(strstr33str43".");
 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 !

Last edited by wwzw; 11-02-2011 at 08:43.
wwzw is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode