Get Connection Speed

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

AliasBDI
Forum Contributor
Posts: 286
Joined: Fri Nov 15, 2002 10:35 am
Location: Spring, TX, USA

Get Connection Speed

Post by AliasBDI »

Is there a way in PHP to retrieve the user (visitor) connection speed like "dial-up" or "broadband" or maybe in the form of 56k or 1mb?

Thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Not reliably. Even the timing of sending a large amount of data can give misleading results, especially if the user goes through a proxy.
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

Hi!
In this forum there already is a Speed testing Script. You can use it.
viewtopic.php?t=61261&start=45
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

neel_basu wrote:Hi!
In this forum there already is a Speed testing Script. You can use it.
viewtopic.php?t=61261&start=45
...which has proven to be completely unreliable and bogus. Sorry.
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

Sorry You missed the last post
dharprog wrote:Hi

Mr.Neel has made a good programme really. I tested it and Its working very well.

here is the link to test :

http://www.indoservices.org/skillbound/spd.php

Thank You very much.
on viewtopic.php?t=61261&start=45
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

neel_basu wrote:Sorry You missed the last post on viewtopic.php?t=61261&start=45
No, I did not. Why? Because it is not done via PHP, but by relying on Javascript. Which may very well be turned off, not to mention your timing may be way off. Again, unreliable.
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

feyd wrote:
neel_basu wrote:Sorry You missed the last post on viewtopic.php?t=61261&start=45
No, I did not. Why? Because it is not done via PHP, but by relying on Javascript. Which may very well be turned off, not to mention your timing may be way off. Again, unreliable.
First Test your speed on that url with javascript enabled.
Whatever Site you go for Speed testing you will see that most of them uses Either Flash or Java Applet or Javascript or any cliant side Scripted Items.
Ya It can also be done By PHP only but the Visitor will get bored with it.
And in this case if Javascript of Users PC is turnd off there is no loss of Server. So if they want to test their speed they need to Enable Javascript. Its their headech now
AliasBDI
Forum Contributor
Posts: 286
Joined: Fri Nov 15, 2002 10:35 am
Location: Spring, TX, USA

Post by AliasBDI »

Thanks ya'll. I'll try the javascript and see what happens. I just preferred PHP.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Neel, can we not get on that topic again. Your method was pretty well disproven. It does not work. Especially with JS off. Here is an example:
With JS on:

Code: Select all

Your Current Bandwidth is:
531.60kbps
That Means You Can Download At 66.45 KB/sec. FROM THIS SITE.
With JS off:

Code: Select all

Testing Your Current Bandwidth...
Other sites that use Flash...

Code: Select all

Megapath: DL - 406Kb/s, UL - 879Kb/s
Linkline: DL - 511Kb/s, UL - 819Kb/s
NetAccess: DL - 325Kb/s, UL - 479Kb/s
AliasBDI
Forum Contributor
Posts: 286
Joined: Fri Nov 15, 2002 10:35 am
Location: Spring, TX, USA

Post by AliasBDI »

Funny ... I tried it and it didn't work. :)
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

I am just Pointing out some Quotes from the Previous Topic
http://forums.devnetwork.net/viewtopic.php?t=61261&postdays=0&postorder=asc&start=0 wrote:
feyd wrote:It's not testing how fast data can be pushed to the client though, it's testing how fast the server can push data internally. It's not a direct active connection between PHP and the requesting client. Javascript, Flash even Java can do actual speed tests. PHP cannot in this case.
kingconnections wrote:I think what feyd, is trying to get at is that php is a server side script. All items are executed on the server and displayed in the client. No execution takes place on the client side of this script.

In order for correct download speed to be measured you would have to use a client side processing language ie java, or java script
.
feyd wrote:It doesn't matter if it's server independent, it does matter whether you are testing the connection versus data pushing power however. ;) Something that's done from the client side (or interacts with it) likely offers a more accurate solution set.
And in this Topic
This Topic wrote:
feyd wrote:but by relying on Javascript. Which may very well be turned off, not to mention your timing may be way off. Again, unreliable.
Everah wrote:Especially with JS off.
And Now Whatever We will do in cliant side may be turned off by the user weather its Flash or Javascript or Java Appleat.
Other sites that use Flash...
Ya I've opened that With flash disabled
Browser wrote:Unable to load Plugin Content
My Speed in String ????
THis is My Speed testing Results
http://www.bandwidthplace.com/speedtest/ wrote:207.4 kilobits per second
Communications 207.4 kilobits per second
Storage 25.3 kilobytes per second
1MB file download 40.4 seconds
Subjective rating Mediocre
My ISP http://calcuttatelephones.com/bandwidthmeter/initialmeter.php wrote:Your current bandwidth reading is:

199.20kbps
http://www.indoservices.org/skillbound/spd.php wrote:Your Current Bandwidth is:

207.80kbps

That Means You Can Download At 25.98 KB/sec. FROM THIS SITE.

Perform a New Test
Speed Testing Varies On the The Server where the Speed testing Script is Running If the Server is Busy or The Internet Connection speed Speed of the server is slowed down It will affect the Speed Testing Result.
And also. And this logic is applicable on each and every Speed testing Sites. And Your net surfing Speed is not fixed or constant It varies Time to Time. and also If Javascript is disabled then the user simply Cant Test his / her Speed just as If Flash Is Disabled or not Installed the User Cant Test his / Her SpeedIf you dont Rely on Javascript why are you relaying on Flash ??
-----------------------
Edit OOPS its Logic not login
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

This is a prime example of why outsourcing is killing our industry... no matter how much proof is given, it's always wrong.


How long do you have to stare at the sky before you will believe us that it is indeed blue...
User avatar
neel_basu
Forum Contributor
Posts: 454
Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India

Post by neel_basu »

nickvd wrote:This is a prime example of why outsourcing is killing our industry... no matter how much proof is given, it's always wrong.


How long do you have to stare at the sky before you will believe us that it is indeed blue...
BLANK POST
Reply If you can answer My Previous Post.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

There's nothing to answer neel.. you're running in a circle.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

No flash, no speed test.
Locked