SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: User Tracking

  1. #1
    SitePoint Wizard bronze trophy bigalreturns's Avatar
    Join Date
    Mar 2006
    Posts
    1,295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    User Tracking

    I'm aiming to track all people on my site at one time, registered users is no problem as I can just use their unique id and a time() in a db, and only check users online <15mins ago. For guests though, I need a way of tracking them that would assign them each a unique id. Is it possible to get a session id number and store that in a table along with time of last action? And more importantly is this a good way to go about what I want?!
    Thanks,
    Alex
    "The proper function of man is to live - not to exist."
    Get a Free TomTom


  2. #2
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    Plano
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can, and it's a great way to do it, and probably one of the only ways of doing it.

  3. #3
    SitePoint Enthusiast forum-index.com's Avatar
    Join Date
    Apr 2006
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can add their ips on a another field and as username or id can you give a name like guest or for id a id only reserved for guests. And can count like a user. on your script can you then count how many Guest or geust id is online and print it.

    This my idea
    Need Backlink? Write review on our Forum Software List

  4. #4
    SitePoint Wizard bronze trophy bigalreturns's Avatar
    Join Date
    Mar 2006
    Posts
    1,295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the responses. Now I'm just struggling to get the SID into my query. I'm using this...

    Code:
    $query="INSERT INTO logguest (sid,lastact) VALUES (" . strip_tags(SID) . "," . time() . ")";
    However, when I echo it out all I get is...

    INSERT INTO logguest (sid,lastact) VALUES (,1146011451)

    Why is the SID constant not being given?
    Thanks,
    Alex
    "The proper function of man is to live - not to exist."
    Get a Free TomTom



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •