Hit counter updating once per IP - IP HIT COUNTER


Posted on 16th Feb 2014 07:03 pm by admin

I have a hit counter, for the amount of views on a tutorial.
It'll do the query and then do..
$views = $row['views'] + 1;
Then insert $views into the database.

This updates the view for each refresh of the page, and more than once per IP.
I am confused as to how I'll check for IP. When a tutorial is posted, it has the IP of the person who posted it aswell as their username.
If I checked if the IP isn't in the database on that tutorial, to ip view status. That means that the person who posted the tutorial couldn't update the view on there.. visit to there tutorial. Though other visitors could update the view status on each refresh.

I am not sure how to do it. The database table has these fields:
Username Tutname Tutorial TimePosted IP Views

Any idea how I'd do it so that "Views" updates by +1 ONCE per visit by IP.

No comments posted yet

Your Answer:

Login to answer
304 Like 53 Dislike
Previous forums Next forums
Other forums

How to get the previous months last date....
Here's my wittle problem. I suck at working with dates.

So today is 10/20/2009, i need to fig

PEAR in appliactiond development
When I was picking up PHP I went from procedural programming, fairly quickly into OOP, then after wr

EXplanation help
Hey all,

I am still fairly new to PHP programming and I am trying to put together a page wher

Parse error: parse error in C:wampwwwlogspagesmembers.php on line 16
I dont see the problem with this, I always get Parse error: parse error in C:wampwwwlogspagesme

2 things: enter doesn't work in IE & empty form
i have this search form that works well except for 2 things.

1) on IE when i hit enter instea

Need help with cin setw
I made a program here is my code:

#include
#include
#i

ob_ dynamic content
i was wondering about the potential to use ob to create a <div then remove it when the page

PHP5 - Verifying a secure mail is secure
I need to send an e-mail from a form to a external department and because it contains personal custo

problems with search form numerical "between" sending by php
I am trying to display the results of a search, on a sql database, on a web page. I set up html &quo

Print 'a' to 'z' via for loop
A very simple problem..
How Can I print a to z NOT a to y ?
It is a part of a code where
<

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash