ping ony tells you how fast a packet can travel from one end to another, this tells you nothing about the max bandwidth of the client.
Ping will give the same result wether I use a 33k modem or a 57k modem or even adsl (provided I use the same ISP ofcourse)
And even downloading 500k (500megs is a bit much don't you think?) will only tell you how fast the network between you and the client is.
A 512mbit line can easily handle 50-60KByte/sec, but you'll rarely see that happen on the internet.
So the most reliable option would be to let the user enter his/her connection speed on an html page.