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

JSON SORT WITH PHP
I have two products that I want to sort by say "Id:17, value: xxx" using php
The page w

writing my own sobel filter convolution - something is wrong
I am trying to keep it very simple, I cant see anything wrong with my logic, could anybody help poin

Blocking video streaming
Hello everyone,

I post a message here because i didn't find any solution yet.
I just finis

Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.

remove innitial

and

tags
i am using tiny_mce as a text editor for my CMS.
buy now the problem is it add <p>

Take info from one coloum and move to another
Hi all,

I have this:
Code: [Select]$array = "SELECT stock_id FROM stocks WHERE stock_

Log $_POST
How would i log submits on a form, by everyone? I want to then echo the number of submissions.

extract content from a website
i have written a code that will grab the content from the index page..
i would like to know how c

Automatic Webpage ??
I have a page www.mysite.com/test.php with a
<form>
<textarea name=&q

Windows Authentication
I have a website which is windows authenticated.
now i want something more on this application.<

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