Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Post track online visitors

    Hi,

    I am trying to create a small art project where I want to track real-time visitors on my site. I am not very good at coding at all and am really struggling to know how to go about this
    To give you an idea of what I want to achieve; a basic example would be for every live visitor on my site, a circle would appear on the index page. I am aiming for the end product to be a very basic visualisation of live visitors on the site. So just a group of circles representing how many people are on the site.

    I am really struggling to get to grips with the coding needed and would hugely appreciate your help.

    Thank you very much for your time,

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,398
    Thanks
    12
    Thanked 570 Times in 563 Posts
    This is only partially a Javascript task ... you need to have a server side component to keep central track of the actions on the page.

    Solution example:
    1. Set up a setInterval in Javascript that regularly requests a status update from the server (maybe every five seconds)
    2. The status update script will collect all the requests and find out (from the IP) how many users are there. The number of users will be reported back to the calling script ... just as a number
    3. The server script will also check if there has been an update for each of the registered IPs in the last (let's say) 8 seconds. If not, remove this IP
    4. The request callback in Javascript will take this number and create circles ... The easiest way would be to have a circle image and add another image for each loop counting up to the number of users

  • Users who have thanked devnull69 for this post:

    njbankhead (03-20-2012)

  • #3
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thank You!

    Thanks for your help! really appreciate it!


  •  

    LinkBacks (?)


    Tags for this Thread

    Posting Permissions

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