We\'ve got a healthy debate going on in the office this week. We\'re creating a Db to store proxy information, for the most part we have the schema worked out except for how
Old thread, but for the benefit of readers, consider using ip2long. It translates ip into an integer.
Basically, you will be converting with ip2long when storing into DB then converting back with long2ip when retrieving from DB. The field type in DB will INT, so you will save space and gain better performance compared to storing ip as a string.