<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Determine connection speed with php</title>
	<atom:link href="http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/</link>
	<description>italian geek and PROgrammer</description>
	<lastBuildDate>Fri, 10 Feb 2012 12:12:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: fireduck</title>
		<link>http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-1021039</link>
		<dc:creator>fireduck</dc:creator>
		<pubDate>Mon, 12 Dec 2011 12:17:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-1021039</guid>
		<description>$kb=1024;

echo &quot;streaming $kb Kb...&lt;!-&quot;;
flush();
$time = explode(&quot; &quot;,microtime());
$start = $time[0] + $time[1];
for($x=0;$x Test finished in $deltat seconds. Your speed is &quot;. $MbpsResult.&quot;Mbps&quot;;</description>
		<content:encoded><![CDATA[<p>$kb=1024;</p>
<p>echo &#8220;streaming $kb Kb&#8230;&lt;!-&quot;;<br />
flush();<br />
$time = explode(&quot; &quot;,microtime());<br />
$start = $time[0] + $time[1];<br />
for($x=0;$x Test finished in $deltat seconds. Your speed is &#8220;. $MbpsResult.&#8221;Mbps&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fireduck</title>
		<link>http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-1021038</link>
		<dc:creator>fireduck</dc:creator>
		<pubDate>Mon, 12 Dec 2011 12:17:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-1021038</guid>
		<description>Thanks for this source code...

Since we are not using old fashion (56k )dial up connection, we have a broadband connection from 5mb to 100mb...

this code will convert from Kbps to Mbps

you are sending data as: 1mb which is equivalent to 1024kb (1*1024 = 1024kb)


$kb=1024; //(change anything from 1-10mb - rem to convert into kb)



echo &quot;streaming $kb Kb...&lt;!-&quot;;
flush();
$time = explode(&quot; &quot;,microtime());
$start = $time[0] + $time[1];
for($x=0;$x Test finished in $deltat seconds. Your speed is &quot;. $MbpsResult.&quot;Mbps&quot;; 


have fun!!</description>
		<content:encoded><![CDATA[<p>Thanks for this source code&#8230;</p>
<p>Since we are not using old fashion (56k )dial up connection, we have a broadband connection from 5mb to 100mb&#8230;</p>
<p>this code will convert from Kbps to Mbps</p>
<p>you are sending data as: 1mb which is equivalent to 1024kb (1*1024 = 1024kb)</p>
<p>$kb=1024; //(change anything from 1-10mb &#8211; rem to convert into kb)</p>
<p>echo &#8220;streaming $kb Kb&#8230;&lt;!-&quot;;<br />
flush();<br />
$time = explode(&quot; &quot;,microtime());<br />
$start = $time[0] + $time[1];<br />
for($x=0;$x Test finished in $deltat seconds. Your speed is &#8220;. $MbpsResult.&#8221;Mbps&#8221;; </p>
<p>have fun!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-834206</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 13 May 2011 17:45:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-834206</guid>
		<description>How did you calculate my Internet connection speed?

Answer: Your connection speed was calculated  on how fast your computer received the first file.

Formula 
Amount of Data/Time to Download = Connection Speed

If you have 1Kb, it is the time taken by your borwser to recive 1kb.

Emanuele Feronato&#039;s PHP script find out total time to exicuate the script.</description>
		<content:encoded><![CDATA[<p>How did you calculate my Internet connection speed?</p>
<p>Answer: Your connection speed was calculated  on how fast your computer received the first file.</p>
<p>Formula<br />
Amount of Data/Time to Download = Connection Speed</p>
<p>If you have 1Kb, it is the time taken by your borwser to recive 1kb.</p>
<p>Emanuele Feronato&#8217;s PHP script find out total time to exicuate the script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-834201</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 13 May 2011 17:15:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-834201</guid>
		<description>Emanuele Feronato  What you mean by connection speed???
The above script never find the the connection speed. 
It jus says the php script exicuation speed. 
It totaly depan upon the server. What connection speed you find here?  

The result of the above code is the Script exicuation speed. There is calcation to find the connection speed in the given script. You please change the heading of this post to avoid miss leading people.</description>
		<content:encoded><![CDATA[<p>Emanuele Feronato  What you mean by connection speed???<br />
The above script never find the the connection speed.<br />
It jus says the php script exicuation speed.<br />
It totaly depan upon the server. What connection speed you find here?  </p>
<p>The result of the above code is the Script exicuation speed. There is calcation to find the connection speed in the given script. You please change the heading of this post to avoid miss leading people.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd</title>
		<link>http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-822564</link>
		<dc:creator>Todd</dc:creator>
		<pubDate>Fri, 29 Apr 2011 17:59:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-822564</guid>
		<description>I think the problem is that flush() does not &quot;wait&quot; for the output to reach the client, so you really can&#039;t tell how long the data is taking to get there. In fact, depending on the web server, flush() may not even send the output buffer (it still gets buffered).</description>
		<content:encoded><![CDATA[<p>I think the problem is that flush() does not &#8220;wait&#8221; for the output to reach the client, so you really can&#8217;t tell how long the data is taking to get there. In fact, depending on the web server, flush() may not even send the output buffer (it still gets buffered).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey Lempert</title>
		<link>http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-686123</link>
		<dc:creator>Sergey Lempert</dc:creator>
		<pubDate>Fri, 26 Nov 2010 14:24:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-686123</guid>
		<description>Great script. I am not sure it will work on dial-up, but it&#039;s not so popular in the last years.</description>
		<content:encoded><![CDATA[<p>Great script. I am not sure it will work on dial-up, but it&#8217;s not so popular in the last years.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gaelos</title>
		<link>http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-616448</link>
		<dc:creator>Gaelos</dc:creator>
		<pubDate>Wed, 04 Aug 2010 21:49:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-616448</guid>
		<description>is it possible to show the bandwidth in real time during the test ?</description>
		<content:encoded><![CDATA[<p>is it possible to show the bandwidth in real time during the test ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vinod</title>
		<link>http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-564756</link>
		<dc:creator>Vinod</dc:creator>
		<pubDate>Tue, 06 Apr 2010 15:48:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-564756</guid>
		<description>Chkd it , simple , useful... love it , thank you</description>
		<content:encoded><![CDATA[<p>Chkd it , simple , useful&#8230; love it , thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis Dykstra</title>
		<link>http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-529357</link>
		<dc:creator>Dennis Dykstra</dc:creator>
		<pubDate>Mon, 07 Dec 2009 16:18:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-529357</guid>
		<description>This seems like a useful approach. I&#039;ve been trying to distinguish between dialup and broadband users in order to avoid sending a lot of images to a slow dialup line. However, when I use the PHP script on a dialup line (actual connection speeds between 45.2 and 50.6 Kbps), I get an odd result: the reported connection speed with your script ranges between 20 and 140 Kbps, with an average of nearly 100 Kbps. Why do you think it&#039;s so high? What is it measuring, if not the actual time to send the 512 KB to the browser?</description>
		<content:encoded><![CDATA[<p>This seems like a useful approach. I&#8217;ve been trying to distinguish between dialup and broadband users in order to avoid sending a lot of images to a slow dialup line. However, when I use the PHP script on a dialup line (actual connection speeds between 45.2 and 50.6 Kbps), I get an odd result: the reported connection speed with your script ranges between 20 and 140 Kbps, with an average of nearly 100 Kbps. Why do you think it&#8217;s so high? What is it measuring, if not the actual time to send the 512 KB to the browser?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark_valley</title>
		<link>http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-462950</link>
		<dc:creator>mark_valley</dc:creator>
		<pubDate>Fri, 19 Jun 2009 17:23:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.emanueleferonato.com/2006/05/31/determine-connection-speed-with-php/#comment-462950</guid>
		<description>Nice script! Of course the result depends on the server&#039;s location.

I adjusted it a bit for my needs. Instead of echoing each character, i build a randon string whith size $kb and echo it. Something like that: 

-------------------------------------------------

for($x = 0; $x &lt; ($kb * 1024); $x++)
{
    $data .= chr(rand(97, 97+20));
}
flush();

$time = explode(&quot; &quot;,microtime());
$start = $time[0] + $time[1];

echo &quot;&quot;;

$time = explode(&quot; &quot;,microtime());
$finish = $time[0] + $time[1];

----------------------------------------------------</description>
		<content:encoded><![CDATA[<p>Nice script! Of course the result depends on the server&#8217;s location.</p>
<p>I adjusted it a bit for my needs. Instead of echoing each character, i build a randon string whith size $kb and echo it. Something like that: </p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>for($x = 0; $x &lt; ($kb * 1024); $x++)<br />
{<br />
    $data .= chr(rand(97, 97+20));<br />
}<br />
flush();</p>
<p>$time = explode(&quot; &quot;,microtime());<br />
$start = $time[0] + $time[1];</p>
<p>echo &quot;&#8221;;</p>
<p>$time = explode(&#8221; &#8220;,microtime());<br />
$finish = $time[0] + $time[1];</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 6/11 queries in 0.050 seconds using disk: basic

Served from: www.emanueleferonato.com @ 2012-02-11 05:12:00 -->
