• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create counter for website?

#1
[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. :-)

#2
[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.

#3
[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.

#4
[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
 


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.