adamriley Posted May 8, 2010 Share Posted May 8, 2010 I have been looking around and cannot find a script that shows how many people are on a "page" ( not hole site ) can it be done Adam Quote Link to comment Share on other sites More sharing options...
litebearer Posted May 8, 2010 Share Posted May 8, 2010 Hmmm consider that at the top of each thread that you view here, the viewers and number of guest viewing that particular page is shown. Does that answer the question? (How? - I haven't a clue!) Quote Link to comment Share on other sites More sharing options...
adamriley Posted May 8, 2010 Author Share Posted May 8, 2010 Ok it does answer my question can you give an example Quote Link to comment Share on other sites More sharing options...
chrismarsden Posted May 8, 2010 Share Posted May 8, 2010 i THINK its something to do with storing cookies, and not the choc chip kind lmao! Quote Link to comment Share on other sites More sharing options...
ignace Posted May 9, 2010 Share Posted May 9, 2010 i THINK its something to do with storing cookies, and not the choc chip kind lmao! How do you know how they look or taste? Ever ate one? 1) Store the current page a user is viewing 2) Query the database for rows that match the current page Quote Link to comment Share on other sites More sharing options...
lostnucleus Posted May 9, 2010 Share Posted May 9, 2010 consider every page as a single row in a table. shd hv col a)last viewed time b)number of views in past 10 mins. now if user request a page if current time > last viewed time + 10 mins then reset the number of views col to 0 else increment the number of views col by 1. and fetch this value to display on the page. Here 10 mins is an offset cd be anything depending upon the defination of your current !! + I can create such script for you easily . just lem no through pm. 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.