how do i do the following??

Links for php scripts

Moderators: egami, macek, gesf

Post Reply
nathanwebb6
New php-forum User
New php-forum User
Posts: 27
Joined: Sat Jul 05, 2003 5:08 pm
Location: england uk
Contact:

Sat Jul 05, 2003 5:11 pm

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??
naya

User avatar
bezmond
Moderator
Moderator
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK
Contact:

Sun Jul 06, 2003 1:28 am

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

nathanwebb6
New php-forum User
New php-forum User
Posts: 27
Joined: Sat Jul 05, 2003 5:08 pm
Location: england uk
Contact:

Sun Jul 06, 2003 4:58 am

hey, thanks! ill give that a try.
naya

nathanwebb6
New php-forum User
New php-forum User
Posts: 27
Joined: Sat Jul 05, 2003 5:08 pm
Location: england uk
Contact:

Sun Jul 06, 2003 9:38 am

thanks from the peson that replied! if you want to test your connection speed, just goto http://hosted.barrysworld.net/naysgames ... edtest.php
naya

User avatar
bezmond
Moderator
Moderator
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK
Contact:

Sun Jul 06, 2003 10:44 am

I take it that worked? :)

Regards,
Andrew

User avatar
WiZARD
Moderator
Moderator
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Mon Jul 07, 2003 5:39 am

nathanwebb6 wrote:thanks from the peson that replied! if you want to test your connection speed, just goto http://hosted.barrysworld.net/naysgames ... edtest.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
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image

nathanwebb6
New php-forum User
New php-forum User
Posts: 27
Joined: Sat Jul 05, 2003 5:08 pm
Location: england uk
Contact:

Tue Jul 15, 2003 2:22 pm

hey... i did use google :P thats how i found this site in the first place lool
naya

nathanwebb6
New php-forum User
New php-forum User
Posts: 27
Joined: Sat Jul 05, 2003 5:08 pm
Location: england uk
Contact:

Tue Jul 15, 2003 2:33 pm

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!
naya

User avatar
swirlee
Moderator
Moderator
Posts: 2257
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Wed Jul 16, 2003 5:25 am

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..
Image

nathanwebb6
New php-forum User
New php-forum User
Posts: 27
Joined: Sat Jul 05, 2003 5:08 pm
Location: england uk
Contact:

Wed Jul 16, 2003 6:52 am

could do, but to how many decimals? 1 2 or 3
naya

User avatar
swirlee
Moderator
Moderator
Posts: 2257
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Wed Jul 16, 2003 7:05 am

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.
Image

nathanwebb6
New php-forum User
New php-forum User
Posts: 27
Joined: Sat Jul 05, 2003 5:08 pm
Location: england uk
Contact:

Wed Jul 16, 2003 12:48 pm

how do i use the round function to round a number to 1 or 3 decimal places?
naya

User avatar
swirlee
Moderator
Moderator
Posts: 2257
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Wed Jul 16, 2003 1:35 pm

nathanwebb6 wrote:how do i use the round function to round a number to 1 or 3 decimal places?


Try the documentation.
Image

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests