corillo181 Posted February 22, 2007 Share Posted February 22, 2007 i was wondering how is best to track user? putting a code in ever page ? Quote Link to comment Share on other sites More sharing options...
JBS103 Posted February 22, 2007 Share Posted February 22, 2007 Do you mean tracking how many users are online currently, or tracking what page each specific user is viewing? Quote Link to comment Share on other sites More sharing options...
corillo181 Posted February 22, 2007 Author Share Posted February 22, 2007 how many users are online currently Quote Link to comment Share on other sites More sharing options...
JBS103 Posted February 22, 2007 Share Posted February 22, 2007 Here are two tutorials. Maybe you could look through them and begin to formulate your own code, and then ask some more questions if you get stuck. http://www.phpfreaks.com/tutorials/62/0.php http://codewalkers.com/tutorials/14/1.html Quote Link to comment Share on other sites More sharing options...
corillo181 Posted February 22, 2007 Author Share Posted February 22, 2007 alright i already got my code but i was wondering how to use it, i will look at this codes and ask again if im still not clear about what i want. thank you. Quote Link to comment Share on other sites More sharing options...
corillo181 Posted February 23, 2007 Author Share Posted February 23, 2007 mm i saw the codes, but it doesn't say it if i have to put the code in every page.. or there is a way to put it in a single page and for it to update to check for users online? Quote Link to comment Share on other sites More sharing options...
corillo181 Posted February 23, 2007 Author Share Posted February 23, 2007 any answers ? Quote Link to comment Share on other sites More sharing options...
mbtaylor Posted February 23, 2007 Share Posted February 23, 2007 It has to be called on every page access. This would usually be from a linked script via include. I personally write a class to contain my statistics code and call something like $statistics -> record_access() via a page that is always linked. This could be a header or footer for example. Quote Link to comment Share on other sites More sharing options...
corillo181 Posted February 23, 2007 Author Share Posted February 23, 2007 thank you that answer one question.. another think i want to know, when making functions should i do them all in one page or use different page for each function? Quote Link to comment Share on other sites More sharing options...
mbtaylor Posted February 23, 2007 Share Posted February 23, 2007 Read up on Object Orientated Programming! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.