what's the right area type for Ip in mysql? and what's the proper way of storing it?
This tutorial may help you: http://daipratt.co.uk/mysql-store-ip-address/.
If you want to store IPv6, you will want to make use of a BINARY area rather and PHP's [cde] function.
Generally you are able to opt for VARCHAR(45) as it will likely be lengthy enough to even store IPv6.
you are able to store these questions binary area having a period of 128 bits (16 bytes,
to transform any ip to the binary representation, you should use the php function [cde]. this process is useful for both IPv4 and IPv6 addresses. [cde] may be used to return the string representation from the saved ip (no matter version)