Hi,
because the client connection is a client-side problem, i think better to solve it with javascript help.
Index.php:
Make your home page, but check for a cookie too.
If not exist save current time in the cookie and put at the end of the page a javascript document.location=document.location (to reload the page...)
When cookie exist get current time and old time in cookie, take the difference. This value may be a clue for client tranasfer rate.
(save the class in cookie...)
You have to be care with cache too...
[edit]
thinking better, cookies are not indispensables, it's sufficent a user table or a file to store the values...
see you