Trying to build a cute little php site statistics script, now I'm stuck with getting the average visiting time on site.
How to do that? I'm using JS badge.
HTTP is stateless, if that is the case how the server knows when the visitor navigates away? JS onunload?