I want to calculate how many times people viewed my user profiles on my site.
I would like to keep the score in my database and stop counting when the user refreshes the page. IP restriction.
I understand that the cache of ip addresses will need to be created and cleared daily.
Is there any instruction on how to do this. Can anyone tell me about this?
$this->input->ip_address()
$this->db->select_sum("counter")->get("views_table");
databasetable:
id | page_id | ip_address | views
ip- ($_SERVER['REMOTE_ADDR']), , ip- , views, views . views > $x .
$_SERVER['REMOTE_ADDR']
views
views > $x
, ?;)
" , "; , , (- F5)? , ...
cronjob, , poormans cron (google )