Re: Tracking all visits to the page

From: Jerry Stuckle <jstucklex_at_attglobal.net>
Date: Tue, 14 Oct 2014 15:36:27 -0400
Message-ID: <m1jtvq$hd6$1_at_dont-email.me>


On 10/14/2014 3:21 PM, Thor wrote:
>
> $result = mysqli_query($link,"SELECT * FROM video1");
> $rows = mysqli_num_rows($result);
>
> $ipadd=$_SERVER['REMOTE_ADDR'];
>
> mysqli_query($link,"INSERT INTO video1 (ipadd,hits) VALUES ('".$ipadd."',1)
> ON DUPLICATE KEY UPDATE hits=hits+1")
> or die(mysqli_error());
>
> mysqli_close($link);
>
>
> This much works as expected. How can I best retrieve the value that
> shows all of the visitors as well? Not just unique visitors.

When you SELECT from your table, include the column "hits". This will show you how many times a particular IP address visited.

Note that this counts IP addresses - NOT VISITORS. A company might have 500 employees on an internal LAN, with only one externally facing IP address. You will show all of those 500 employees as one visitor.

And since I have a dynamic address at home, the IP I get tomorrow may be different from the one I have today. You will show it as two different visitors.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex_at_attglobal.net
==================
Received on Tue Oct 14 2014 - 21:36:27 CEST

Original text of this message