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.
Did you know?Explore Trending and Topic pages for more stories like this.

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

Cron Job and Output
I have php codes running under a cron job.
But everytime i output (echo) , it comes out as comple

Inserting 100x and 100y coordinates in mysql table - easy
Is there a way to insert this data into a mysql table named 'map' with the fields: 'x int 3' , 'y in

Simple Variable Question
Hi everyone.... again,

I am really getting into php still. Learning more every day. I love it

server trace logs
could any one tell me from where do i get error logs in xMII??I want to check the reason for dtabase

Easy administration on MySQL databases
My website is database driven and I am very tired of manually making queries to my tables in order t

PHP page loading in Firefox but not in IE
hello,

i am currently doing a project in PHP and i have a problem. If I view the project in M

Dynamically allocating the number of rows in a table based on a variable value
Hi,
I have situation here which i cannot resolve, I have a variable temp which stores the num

Class not found error
I am getting Class 'index' not found in Eval function:

//write config

$pat

Rss feed question
Hi

My blog and my website are different. Am i able to take my rss feed
from my blog and p

Help on code output
My CODE:

Code: [Select] echo "<phone>".$line["phone"].&qu

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