title: Counting Unique Visitor
body: <ul>
  <li>I want to count unique visitors and show them to visitors. </li>
  <li>I don't want to use any 3rd party tool (like analytics or something
  else)</li>
  </ul>
  
  <p>What is a unique visitor exactly? Does the REAL unique visitor changes with IP, cookie or MAC? </p>
  
  <p>I've though this way:</p>
  
  <ul>
  <li>Get visitors IP adress</li>
  <li>Search it from database</li>
  <li>If exists, don't do anything</li>
  <li>If not, insert IP adress and server time to database and add this to count</li>
  </ul>
  
  <p>Is this way right? Should I use cookies or get MAC adresses too? BTW all these things -getting information, store it, compare it- legal?</p>
  
  <p>And one last question. Can I do all these things WITHOUT database? Only with using JS, PHP and text files or something else?</p>