It's come back to bite me on my ass, school has, well at least not listening in maths class.
I am using exec("ping -q -c 1 -s 8 $REMOTE_ADDR") to get the users ping.
Then I want to convert the ping into bytes per second, then KB/s etc.
Eventually I want to get the ETA download time on how long it will take to download a particular file.
Trouble is, I have no clue on how to do the math.
I'm sending out 8 bytes of data which translates into 16 ICMP bytes and it (after i clean it up) returns the milli-seconds it took to do the round trip.
I can figure out how long it will take not a problem, if I could get the correct bytes / second or even bytes / milli-second.
Anyone good at maths that can help?