Detecting Broadband?
Moderator: General Moderators
Please test your connection with that and then test it with something like http://www.bandwidthplace.com/speedtest/ this will hopefully show you that it in fact does not work. Also take notice of the wealth of information other posters have given you and I hope you take notice not to base information on that script.
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Your test:
Helllo User Your Net Surfing Speed is 19.989 kb/s
CNET's bandwidth test:
446.7 Kbps
Speakeasy Speed Test
550 Kbps Down
696 KbpsUp
I think it is safe to say your code does not work like you think it does.
PS I know I said I was done with this thread, but these results don't lie, so I thought I'd throw them out there.
Helllo User Your Net Surfing Speed is 19.989 kb/s
CNET's bandwidth test:
446.7 Kbps
Speakeasy Speed Test
550 Kbps Down
696 KbpsUp
I think it is safe to say your code does not work like you think it does.
PS I know I said I was done with this thread, but these results don't lie, so I thought I'd throw them out there.
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
I'm in the UK, I used this bandwidth test provided by ZDNet: http://specials.zdnet.co.uk/misc/band-t ... est50.html
It reported 6580.6 Kbps.
Your website reported Helllo User Your Net Surfing Speed is 111.684 kb/s, which you'll notice is very similar to what everyone else got using your script. If the script was hosted on a different server, the results would be different, but would probably be in a fixed range like yours.
Thats more than 50 times off of what it should be. The fundamentals of your script are all wrong, but they've been covered by other people, so now surely you can just read the figures and realise that even if your script was fundamentally correct that it doesn't work properly anyway.
It reported 6580.6 Kbps.
Your website reported Helllo User Your Net Surfing Speed is 111.684 kb/s, which you'll notice is very similar to what everyone else got using your script. If the script was hosted on a different server, the results would be different, but would probably be in a fixed range like yours.
Thats more than 50 times off of what it should be. The fundamentals of your script are all wrong, but they've been covered by other people, so now surely you can just read the figures and realise that even if your script was fundamentally correct that it doesn't work properly anyway.
- neel_basu
- Forum Contributor
- Posts: 454
- Joined: Wed Dec 06, 2006 9:33 am
- Location: Picnic Garden, Kolkata, India
Perhaps Its What He Need (spd.php)
==========================
==========================================================
== DONT TEST ON LOCALHOST UPLOAD THIS FILE AND THE BINARY FILE ==
== TO A SERVER AND THEN TEST IT ==
== IT WOULD BE GOOD IF YOU USE A BINARY FILE THATS MORE THAN 2 MB ==
==========================================================
==========================
Code: Select all
<?php
if(isset($_GET['kbps']))
{
?>
<?php
$kbps = round($_GET['kbps'], 2);
$ksec = round($kbps / 8, 2);
$mbps = round($kbps / 1024, 2);
$msec = round($mbps / 8, 2);
?>
<center>
<br><br>
Your Current Bandwidth is:<br><br>
<?php
if ($mbps > 1)
{
printf ("%.2f",$mbps);
echo " Mbps<br><br>";
}
else
{
printf ("%.2f",$kbps);
echo "kbps<br><br>";
}
echo "That Means You Can Download At " . $ksec . " KB/sec. FROM THIS SITE.";
?>
<br><br>
<a href="spd.php">Perform a New Test</a>
</center>
<?php
}
else
{
?>
<?php
$default_kbyte_test_size = 512;
?>
<html>
<head>
<title>Bandwidth Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<META HTTP-EQUIV="Expires" CONTENT="Fri, Jun 12 1981 08:20:00 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<br><br><br><br><br><br>
Testing Your Current Bandwidth...
<script language="JavaScript">
<!--
time = new Date();
starttime = time.getTime();
// -->
</script>
<?php
// $data_file Should Be A Junk Binary File I Tested It With a 3 MB file.
//Use Any Binary File And Just Rename It
//I Just Used A ZIpped Backup File Of Mine
$data_file = "A_Sample_binary_file.zip";
$fd = fopen ($data_file, "rb+");
$test_kbytes = $default_kbyte_test_size;
$contents = fread ($fd, $test_kbytes * 1024);
echo "<!-- $contents -->";
fclose ($fd);
?>
<script language="JavaScript">
<!--
time = new Date();
endtime = time.getTime();
if (endtime == starttime)
{downloadtime = 0
}
else
{downloadtime = (endtime - starttime)/1000;
}
kbytes_of_data = <?php echo $test_kbytes; ?>;
linespeed = kbytes_of_data/downloadtime;
kbps = (Math.round((linespeed*8)*10*1.024))/10;
nexturl = 'spd.php?kbps='+ kbps;
//alert(kbytes_of_data);
document.location.href=nexturl;
// -->
</script>
<center>
</body>
</html>
<?php
}
?>== DONT TEST ON LOCALHOST UPLOAD THIS FILE AND THE BINARY FILE ==
== TO A SERVER AND THEN TEST IT ==
== IT WOULD BE GOOD IF YOU USE A BINARY FILE THATS MORE THAN 2 MB ==
==========================================================
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
- neel_basu
- Forum Contributor
- Posts: 454
- Joined: Wed Dec 06, 2006 9:33 am
- Location: Picnic Garden, Kolkata, India
I Have Told It Before That Dont do it On Your localhostnickvd wrote:You just don't seem to get it do you?
I highly doubt it...Your Current Bandwidth is:
256.00 Mbps
That Means You Can Download At 32768 KB/sec. FROM THIS SITE.
I HIGHLY recommend you go back to school, or perhaps buy an introduction to networking book...
Cause When You are Testing it In Localhost No Internet Connection Is Required.
If The Binary File Is Also On localhost Then How Could It Tell It Your Speed
It Would Be Just Funny
You PLease Upload It And the Binary File Then Test It
I Dont Know A Free server Where I Can Upload It To Test If Anybody Know's Pls ell Me I'll Test It
- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
Here, I wrote a script that you might use instead:
I haven't tested this, but it should work.
Code: Select all
echo "You're connection clocks in at " . rand() . "mb/s (" . rand() . "kb/s)";-
konstandinos
- Forum Commoner
- Posts: 68
- Joined: Wed Oct 04, 2006 4:20 am
that's quite simply the funniest post i've ever come across.aaronhall wrote:Here, I wrote a script that you might use instead:I haven't tested this, but it should work.Code: Select all
echo "You're connection clocks in at " . rand() . "mb/s (" . rand() . "kb/s)";