RE: [PHP] Ip Address to binary
You could use MySql's built in functions: INET_NTOA() INET_ATON() Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.210.7145 Fax: 816.753.1952 -Original Message- From: Jason Bell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 12, 2001 4:30 PM To: PHP Users Subject: [PHP] Ip Address to binary does anyone know of a way to convert an IP address to Binary using PHP? My plan is to store the IP address in MySQL so that I can manage a mass amount of IP subnets, and easily make sure I'm not assigning duplicate subnets. the best way I can think of is to use binary. any other ideas, thoughts or comments? Thanks! -Jason Bell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Ip Address to binary
I want to add I have seen bindec() , and I think it's a cruel cruel joke for it to only work with 31 bits, given that ip4 addresses are 32 bits. :} - Original Message - From: "Jason Bell" <[EMAIL PROTECTED]> To: "PHP Users" <[EMAIL PROTECTED]> Sent: Wednesday, September 12, 2001 2:29 PM Subject: [PHP] Ip Address to binary does anyone know of a way to convert an IP address to Binary using PHP? My plan is to store the IP address in MySQL so that I can manage a mass amount of IP subnets, and easily make sure I'm not assigning duplicate subnets. the best way I can think of is to use binary. any other ideas, thoughts or comments? Thanks! -Jason Bell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]