@GenixdeaeMay 31.2008 — #To get the overall site generation, put $start_time at the top of your page(first thing to run), and then put the $end_time at the bottom(last thing run. then just subtract your start_time from your end and you have your page generation time.[code=php]//Start time $start_time = microtime();
//End time $end_time = microtime() - $start_time; $end_time = round($end_time, 5); echo $end_time;[/code] For the total, depending on if you're wanting stats or user visit time will depend on how you calculate the total. If you're looking for the stats then just make another variable like $site_time and keep adding to that after each page is made.[code=php]$site_time += $end_time //might be =+ can't remember echo $site_time[/code]
@mvnr_83authorMay 31.2008 — #Thanks Genixdeae for ur replay.
but my requirement is calculate page visit time of a particular user and post that time in the database. i am thought less if user terminate from that page.