title: How to store ip addresses of visitors in database in php?
body: <p>I have tried this php method to get ip address but it is providing wrong output.
  the regular method </p>
  
  <pre><code> &lt;?php     echo $_SERVER['REMOTE_ADDR'];   ?&gt;
  </code></pre>
  
  <p>does not provide the appropriate output. when i use this method , i get output like </p>
  
  <blockquote>
    <p>IP address : '::1'</p>
  </blockquote>
  
  <p>is there any problem in my script?
  also give the details about storing those ip addresses in database
  Thanks in advance</p>