how do i do the following??

A

Anonymous

Guest
hey, i have made a speed test, and it works fine, but once it has ran once, the image it downloads to calcualte the results is on the users computer. Even when it is on the computer, i still need the image to load from scratch if he does it again, so what script can i use to make images load from the site and not a users system??
 
try using the following:
<?
$number = rand(1,100000000);
?>
then insert the image, e.g. <img src="result.jpg?n=<? echo $number ?>">

That *should* force cache to reload the image, but the ?n= will be ignored completely!

Andrew
 
thanks from the peson that replied! if you want to test your connection speed, just goto http://hosted.barrysworld.net/naysgames/speedtest/speedtest.php
 
nathanwebb6 said:
thanks from the peson that replied! if you want to test your connection speed, just goto http://hosted.barrysworld.net/naysgames/speedtest/speedtest.php
TEST RESULTS ARE AS FOLLOWING...
Your Connection speed is 7564.2764578834 bytes per second
Your Connection Speed is 7.3869887284017 kiloBYTES per second
Your Connection Speed is 59.095909827214 kiloBITS per second (this is what your modem is measured in)
A 1 megabyte download would take 138.9 seconds
 
hey... i did use google :p thats how i found this site in the first place lool
 
by the way, i dont know when you took that test, but if the results were way out of your real connection speed, try taking it again, because i have set it to run in a different way now which is much more accurate!
 
TEST RESULTS ARE AS FOLLOWING...

Your Connection speed is 103566.09167077 bytes per second
Your Connection Speed is 101.13876139724 kiloBYTES per second
Your Connection Speed is 809.11009117792 kiloBITS per second (this is what your modem is measured in)
A 1 megabyte download would take 10.145 seconds

Nice. I might suggest, though, that you trim off a few of the decimal points..
 
If I were you, I'd limit bytes to one decimal and the others to three. Also, you might think about using number_format() to add commas to bigger numbers for readability.
 
how do i use the round function to round a number to 1 or 3 decimal places?
 
Back
Top