0
I would like to make a counter views/ page accesses that take the link.
Ex.:
noticia.php? p=1 - 33 views
noticia.php? p=2 - 14 views
noticia.php? p=3 - 08 views
Can someone help me?
0
I would like to make a counter views/ page accesses that take the link.
Ex.:
noticia.php? p=1 - 33 views
noticia.php? p=2 - 14 views
noticia.php? p=3 - 08 views
Can someone help me?
Browser other questions tagged php
You are not signed in. Login or sign up in order to post.
What do you really want? If you are going to generate a simple report, just check the user’s IP before recording to add up +1.
– Papa Charlie
I intend to display it on a page that contains a news, signaling how many people have read or entered the link.
– Guilherme Afonso
Before updating with +1, use an auxiliary table to record the IP of the person who accessed the news. If the IP is not in the table you sum +1, otherwise consider that the user has already read.
– Papa Charlie
Generates a Session as soon as the user accesses the site does not count by IP, records the Session and puts as a counter, consider that the same computer can be shared and/or a shared network that is under the same IP.
– Diego Vieira
@Diegovieira, did not consider that the user can remove the session cookie?
– Papa Charlie
@PapaCharlie http://www.tuxradar.com/practicalphp/10/1/0
– Diego Vieira
Guys, I’m in need of a script that counts the visits in a site posts, I wanted to use a get url type, but I don’t know much about PHP. If necessary I can use database. Someone would happen to have this script?
– Guilherme Afonso
@Diegovieira, I don’t think you know that to have a session you need a cookie. PHP uses a cookie called PHPSESSID to identify the user. Just remove the cookie.
– Papa Charlie
will have to use database yes, regardless if you use PHP Server, if apache restart you would lose everything that is in Session.
– SneepS NinjA