In MySQL (and others?) you can use these two functions:
INET_NTOA(expr)
INET_ATON(expr)

Regards
Joakim


----- Original Message -----
From: "Noodle Snacks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 10:13 AM
Subject: [PHP] Ip address as 32bit int?


Is it easy enough to change a formated IP addy (eg 192.168.0.1) to the 32bit
unsigned int that computers use?

the reason I ask is because it is alot more efficient space wise in a db to
be storing a 32bit number rather that a char or varchar field.

Or am I going to run into trouble because all ints are signed in PHP?


--
JJ Harrison
[EMAIL PROTECTED]






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to