title: SQL Insert IP as Unique ID (not working completely)
body: <p>I have a problem to register all IP-addresses from the visitors with a Unique Key made from their IP-address...</p>
  
  <p>I see also that some visitors have a different Unique Key made from their IP-address... To get a Unique Key I use str_replace from the IP-address
   but some str_replace gives different numbers than their IP-address</p>
  
  <p>I saw in another table what register all IP-addresses without a Unique Key,
  that some visitors are not registered in the table with Unique Key made from their IP-address.</p>
  
  <p>I hope anyone has tips how to register all IP-addresses with a Unique-Key made from their IP-Addresses ???</p>
  
  <p>I am using this PHP code</p>
  
  <pre><code>&lt;?php
  
   $ip = $_SERVER['REMOTE_ADDR'];
   $today = date("Y-m-d-H.i.s");
   $intip = str_replace(".","",$ip);
   $details = json_decode(file_get_contents("http://ipinfo.io/{$ip}"));
   echo $details-&gt;country; // -&gt; "US"
   ?&gt;
  </code></pre>
  
  <p>&amp; This is the SQL INSERT INTO code</p>
  
  <pre><code> mysqli_query($con," INSERT INTO ip_register (id,ip_adress,country,date) 
   VALUES ('$intip','$ip','$details-&gt;country','$today') ON DUPLICATE KEY 
   UPDATE ip_adress ='$ip' ");
  </code></pre>