title: Updating unique views based on IP and user agent string
body: <p>I have a table <code>temp_views</code> which stores temporary views (for an hour) based on the ID of a post, the IP of the user and their user agent string.</p>
  
  <pre><code>SELECT COUNT(*) as viewed 
  FROM temp_views 
  WHERE showcase_id=:showcase_id AND ip=:ip AND user_agent=:user_agent
  </code></pre>
  
  <p>Both the IP and the user agent are stored in the table as simply <code>TEXT</code>. (Should I be doing that another way?).</p>
  
  <p>If <code>viewed</code> is 0, then it adds a view - otherwise it does nothing.</p>
  
  <p>What I'm wondering is, can this be "gamed" at all? If the IP matches but the user agent doesn't, then it will add a view. Can the user agent be spoofed easily or something? (A view is added asynchronously with Ajax as the user scrolls down the page).</p>
  
  <p>Additionally, is this slow/inefficient or is it okay?</p>