How to create counter for website? |
[eluser]java[/eluser]
I want to put the counter in my web page such as: Number of visitor online Number of accessing Number of accessing a day How to do that? Thanks for any response. :-)
[eluser]thachp[/eluser]
Use session. Store session data into a table (MySQL). Count # of unique ip to get unique visitors. ( exclude potential bot agents ) Not sure what you mean by number of accessing. Is that X times a page got reload? if so, create a table (MySQL) with following columns ( id, page, date ). In controller, insert new row everytime page get reload. Count rows. Accessing / day. Count # of reload for specific date.
[eluser]java[/eluser]
Thanks for your advise. About number of accessing : i am trying to avoid couting page reload (refresh), just only count particular visitor visit my page. In codeigniter user guide have session class, it use table ci_sessions to store session data but i dont know how to get id data to check it(if isset($session_data) // assign a specific value to $count and insert $count to table). Thanks alot.
[eluser]John_Betong[/eluser]
Maybe slightly off topic? I have started to use http://www.google.com/analytics/ which is once again a freebie and quite impressive with the graphs, etc |
Welcome Guest, Not a member yet? Register Sign In |