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

header redirect problems? please help
Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1

SOAP Issue
Hi,

I am facing some understanding problem with SOAP basic.kindly recommend some SOAP expert.

sql error
I have been looking at this code for 20mins and can't work out what I am doing wrong. There is somet

Restricted access to sub-folder in iis6 doesn't work?
Basically I'm trying to add restriction to sub-folder (which contains pdf) in web.config for iis6 as

explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc

Please help with code for SMTP authenticated PHP email form
Hello, I'm creating a PHP email form, and for this particular server, I have to use SMTP Authenticat

Function
How can I make this function that once you click the link in the code it takes you to a new page wit

shoping cart issues
i´ve wrote this and works when i add an item to, my cart, but when i want to add othrer item just

frame help
on the bottom frame is menu.html

Code: <body><form action='link.php' met

Problem with PHP code- simple contact form
I'm relativily new to PHP; I know HTML and CSS stuff but I have a problem- I have a contact form wit

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