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 Link to comment https://forums.phpfreaks.com/topic/201112-is-this-posible-in-php/ 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!) Link to comment https://forums.phpfreaks.com/topic/201112-is-this-posible-in-php/#findComment-1055106 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 Link to comment https://forums.phpfreaks.com/topic/201112-is-this-posible-in-php/#findComment-1055108 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! Link to comment https://forums.phpfreaks.com/topic/201112-is-this-posible-in-php/#findComment-1055200 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 Link to comment https://forums.phpfreaks.com/topic/201112-is-this-posible-in-php/#findComment-1055265 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. Link to comment https://forums.phpfreaks.com/topic/201112-is-this-posible-in-php/#findComment-1055307 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.