I'm using a simple way to get the real ip. I found it here: How to get Real IP from Visitor?
The IP will be stored into database, in some column width VARCHAR 15. I'm using Varchar with length 15 because I understand that the ip address can be 123.456.789.123, which has 12 numbers and 3 dots.
Now... I saw that the IPv6 has more chars. I do not understand. All users have a particular IPv4 or may be some users with IPv6 and not IPv4 ?
I need to understand because I want to optimize this column of IP, as I saw here: insert ip into mysql is better to make it decimal.
How to should I make this column decimal if the ip (version 6) can have more than 15 chars ?
I'm confuse...