Note, if you wanted to be a little more flashy, you could create a PHP script that would ping the REMOTE_ADDR server variable passed through HTTP and then parse that, and generate your speed results.
IE:
Ping > 1024 MS = Bad connection
Ping > 500 MS and Ping < 1024 MS = "Dialup"
Etc.