title: Storing and retrieving IPv4 and IPv6 addresses
body: <p>There's a million questions on SO about the best way to store IPv4 and IPv6 addresses on a PHP/MySQL setup, but the answers are either out of date (only IPv4) or they're contradictory/incomplete.</p>
  
  <p>I've created this question to go with a clear answer that gives you everything you need to know.</p>