Bandwidth testing….???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Bandwidth testing….???

Post by alexus »

I would like to test my visitor’s amount of bandwidth and current connection speed… :?:

Well I’m not quiet sure how to do it, I even don’t know that PHP can do this, but in another hand I definitely can not use user side scripts…

PS: :idea: I got one idea but I still don’t know how to use it: I could use SYSTEM command then CMD (I’m running 2003 Web server) then PING $user_ip (or something else that can give me the user speed / bandwidth information), but even than I’ll have a problem retrieving speed value from system return argument…

Any Ideas How Can I Do This?
:arrow:
Thanks!
Judas
Forum Commoner
Posts: 67
Joined: Tue Jun 10, 2003 3:34 pm
Location: Netherlands

Post by Judas »

Real speed.
Try uploading or downloading some data file's from and to client pc.
These data file's have an exact size.(you can use seperate data file for txt and bin content)
Count the acctual time.
Calculate "time" "content" "size".
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

Is there any build in functions for this, because I don’t like to up / down loading files to the client?

I just want to know the speed… + it will be tech problem with uploading a file without client permission especially to WinXP
Judas
Forum Commoner
Posts: 67
Joined: Tue Jun 10, 2003 3:34 pm
Location: Netherlands

Post by Judas »

I don't know at the momment.
http://www.speedtest.nl/TestSuite/TestController.asp
Maybe you can discover howe the have done it.
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

Download : 167.0 KByte/sec
Upload : 86.8 KByte/sec
Connection : 471.0 Conn/min
Ping test Nederland : 90.0 ms

1. The did it in ASP ( VB.6 or C#)
2. The results is not accurate my connection speed should be at least 1000 Kb/s (T1)

So how can I get real connection speed…???
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

167 Kilobyte per second = 1336 Kilo bit per second .. then comes some overhead, and possibly some compression included, so that does not sound to far off for a T1, if it is somewhat slower its likely the route inbetween and/or the webserver/noc activity/connection/burst-allowance etc..

I have never done any bandwidth testing code, but I would question how easy it is to do just from PHP or any webserver scripting language may be tricky, as all output will often be buffered and thrown out in a chunk, and even if you turn buffering off I assume that the webserver or networking layers has mechanisms that will allow the script to end before the transfer was actually finished..
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

not to mentiont hat there's stuff done on his lan. in a t1 you will never reach max speed becasue the network people have things set to be checked for your safety, not to mention however many you are sharing it with. between all that 167Kb/sec is good
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

So, after all is there any way to create such script on PHP? :roll:
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

same way they did it in asp i imagine. they send a few files and time it and then calculate on the round trip.

just remember that there's always overhead.
even though a 56k modem CAN transfer up to 56k, upstream has a 33.3 limit (federal setting) and when you take into account what will always be there, a reasonable maximum is 30k/sec. add in other traffic and you're looking at 20k/sec or lower as an expected average

if you want to know more and live near boston, harvard has a great course on it: Communication Protocols and Internet Architecture

i'm sure other schools have similar courses. look at the write up to that at http://www.harvard.edu and find something comparable at a college near you if you really wanna understand.
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

:cry: … Harvard would never accept me… (Unfortunately) … even if I really want to study some courses there…

Now back to PHP and now asp, as far as I remembered PHP could force user to download file but the I need to get the statistic ( I’m not sute thet PHP is generating this statistics for uploads, so we will then download same file from user [ 50k for example]. Well we don’t want to do so many jobs for user so we want to up load file automatically… :roll: And how can I do that?

:arrow:
And I just came up with another Idea! --- Macromedia Flash 5 or MX, client side action script, all preloders are showing real speed (at least I think so…) :?: but how can I transmit data from *.swf to *.PHP
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

if you do like me and go summer school i don't think they'll care about anything but if you can pay the $$ for the tuition.

i wanted to lighten the workload for my sr year, so summer after jr year i took courses via harvard's summer school since i wanted to know a bit more about the nitty gritty since all the brandeis courses are programming THEORY. i wanted something that's not theory....so i took some courses at harvard
alexus
Forum Contributor
Posts: 159
Joined: Fri Jul 04, 2003 10:49 pm

Post by alexus »

Sounds good, but it is the middle of the summer now... and how much do they want? (for summer school?)

Is they really better then others?
8)
Post Reply