473,396 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Tracking user activity in PHP

Hi,

My client is using the UBB Threads forum and I was recently asked to
look into adding the ability to track the activity of each of the users
to see who is more active than others. Users are identified by a
cookie.

Now can this be done at the server level somehow? Or would it be easier
to include a tracking function in each page that records a per user hit
count?

Obviously I don't want to give the server more work to do than is
necessary.

Thanks in advance,
Dave

Mar 8 '06 #1
1 5904
>My client is using the UBB Threads forum and I was recently asked to
look into adding the ability to track the activity of each of the users
to see who is more active than others. Users are identified by a
cookie.
Take the value from $_COOKIE['userid'] and use it to increment a
counter in a database for the user. Or log the user id, page,
timestamp and IP address in a database. It depends on how much
detail you need.
Now can this be done at the server level somehow?
Yes.
Or would it be easier
to include a tracking function in each page that records a per user hit
count?
The counting would have to be done on each page, or in common
code included from each page. I believe Apache has a capability
of specifying a header file for each PHP page in a directory so
you could use that without editing existing pages.

Client-side tracking is difficult because Javascript is Turned
Off(tm), a single user does not necessarily mean a single computer
with a single browser, and the data, being stored on the client,
isn't as accessible when you need it.
Obviously I don't want to give the server more work to do than is
necessary.


Gordon L. Burditt
Mar 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Kenneth Courville | last post by:
Hello, I have an application that will be logging to a SQL Server 2000 database user user activity from several Windows 2003 terminal servers. This information will be retrieved by monitoring...
1
by: Bhavesh Patel | last post by:
Hello I developed Discussion Forum for my company.In this forum User can read post,made post ,create new thread etc like open source Telligent Systems' forum. I developed it ASP.Net with Sql...
5
by: HttpWebRequest | last post by:
I am trying to get tracking information from UPS web site without much luck. I got this working in VB 60 without any problems by using WinInet functions Here my test program. We need to get...
2
by: Jesper | last post by:
Hi, How do you detect if there is (or not) user activity on a computer. Probably the same technique as used in the screen saver. Can I subscribe to some OS event. Regards Jesper, Denmark.
4
by: David Chang | last post by:
Hi, can any one show me a link or give me some sample scripts about web tracking by using javascripts (similar to web logs but on client side)? I googled it, but didn't get any luck so far. ...
2
by: C# programmer | last post by:
Hi All, I'm working on a project which requires tracking of recent document downloads. There is a feature in which user can download the docs without logining into the website for some of the...
3
by: =?Utf-8?B?R3JhaGFt?= | last post by:
I've added 2 tracking services to the wf runtime; one is the standard SqlTrackingService: trackingService = new SqlTrackingService(<trackingConnectionString>); <workflow...
2
by: jlaustill | last post by:
Hello everyone, I have a fairly unique need :) I am trying to determine the use/clients for databases in my corporation that I am maintaining, but that noone seems to know what they are for. Many...
0
by: Chandra143 | last post by:
Hi all, I am trying to develop an application for tracking all instant messengers chat details and also web activity i.e. mails sent and mails recieved.Could any one knows any free ware or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.