Open Source Speedtest

Fancy Speed Test

Features

  • Upload and download bandwidth tests
  • Interactive user experience
  • Very customizable
  • Saves results in a database
  • Restrict to particular networks / IP Addresses
  • Customizable look
  • Customizable maximum file sizes

Sample Speedtest

Example test here

Download

speedtest-1.1.zip Fancy Speed Test Version 1.1 (.zip format)
speedtest-1.1.tar.gz Fancy Speed Test Version 1.1 (.tar.gz format)

Installation Instructions

Detailed installation instructions can viewed online. The same instructions are available inside the downloadable archive named INSTALL

Troubleshooting

Speed test results seem accurate up to about 10 Mbps.  At speeds higher than that, the large chunks of data start to slow down the JavaScript engine on the client.

Credits

  • The download portion of this test was loosely based on an old speedtest by Gambit Design
  • The upload portion of the test was loosely based on MegaUpload

95 thoughts on “Open Source Speedtest”

  1. @Rob – I would guess that if there is a javascript syntax error anywhere in the header, it stops the javascript from continuing to execute on the rest of the page, which would obviously break the speedtest. Good catch.

  2. Brandon,
    you’re right, I’ve got no problem with download results for speed below 1Mbps (typical ADSL access), only the test in LAN (at office) give inaccurate download readings.

    If somebody know a way to overcome this, do share it here.

  3. Hi,

    I install the speed test in my local server Fedora Core 4 with Perl 5.8.x. and Apache/2.0.54. I could not get the upload work and got the 500 Internal Server Error.

    Please advice on this issue.

    Regards,
    Borin

  4. Hi all,

    Could anyone help me to get this script working? So far, I could not get it work at all on my server.

    Regards,
    Borin

  5. Works great!

    Ran into a couple minor issues:
    Base URL needs to end in “/”. If you put “http://foo.com/bar”, a script directs your browser to “http://foo.com/barresults.php”

    Someone above said this was a problem with misnamed files – it’s not, it’s how a script handled the base URL when trying to get the properly named file. Renaming the file will work, until you move speedtest to a folder with a different name.

  6. Howdy Brandon. I’m checking out your Speedtest app and it’s exactly what I’m looking for! I know you’re intending for this to be open source, but is there a particular license you assume is in effect here?

    I’m interested in using it at work for commercial purposes.

    Thanks!
    -ab

  7. Is there anything special with the payload.js file?

    That seems to be the reason why it is inaccurate. I’m trying to fix that but I can not get around the payload.js file every time I try to change it, the progress bar then stops working.

    Is the payload.js like jquery, mootools, prototype etc. js library or something?

    Or is it just some random file you base64ed?

    Thanks

  8. @David,

    It has been a while since I have written this, but IIRC for some reason the file has to have slashes at the end of each line. It just uses raw javascript, no 3rd party libraries. If I was to rewrite it today (something I keep intending to do, but never have time to), I would do it with jquery.

  9. I second the fact that the results are not accurate at all…. if you disable the upload test, your download speed with appear to multiply by 10.

    something is very off with the calculations here.

  10. Hello I’m giving this a try on the following:
    WinXP Pro
    IIS 5.1
    ActivePerl 5.10.1 Build 1006
    PHP 5.3.0

    I Unzipped speedtest-1.1.zip into the default c:\Inetpub\ directory.
    Configured base_url and upload_url with http://127.0.0.1/speedtest & http://127.0.0.1/speedtest/upload.cgi
    Configured directory for scripts & executables

    After beginning download from index.php by clicking the ‘start test’ button it hangs with message ‘Calculating appropriate file sizes for testing’. Then it eventually times out.

    Does anyone have a working IIS configuration?

  11. Big thanks! After a lot of googling I found this speedtest and realized that it completely covered my needs.

  12. Fancy Speed Test returns slightly higher results than real if gzip compresion enabled on web server. That is no problem, placing “BrowserMatch .* no-gzip” resolves the issue.

  13. if you’re running XAMPP on Windows, as was my case, be sure to replace: “#!/usr/bin/perl -w
    at the the top of your UPLOAD.CGI file with:
    #!”D:\xampp\perl\bin\perl.exe”

  14. Very good tool just what I was looking for. After some setbacks with the execution of upload.cgi this runs smoothly, but I do not give any speed increase, but if the download speed.
    The test file I worked without problems tiempo.cgi
    I have a server with
    Centos – Apache2 – PHP5 – Pelras installed
    Copy the apache error log

    [Mon Sep 20 15:19:07 2010] [error] [client Mi IP] PHP Warning: Division by zero in /Uno/test/pruebas/speedtest/results.php on line 110, referer: http://mi_sitio/pruebas/speedtest//download.php
    [Mon Sep 20 15:19:07 2010] [error] [client MI IP] PHP Warning: Division by zero in /Uno/test/pruebas/speedtest/results.php on line 110, referer: http://mi_sitio/pruebas/speedtest//download.php
    [Mon Sep 20 15:19:07 2010] [error] [client MI IP] PHP Warning: Division by zero in /Uno/test/pruebas/speedtest/results.php on line 110, referer: http://mi_sitio/pruebas/speedtest//download.php
    [Mon Sep 20 15:19:07 2010] [error] [client MI IP] PHP Warning: Division by zero in /Uno/test/pruebas/speedtest/results.php on line 110, referer: http://mi_sitio/pruebas/speedtest//download.php
    [Mon Sep 20 15:19:07 2010] [error] [client MI IP] PHP Warning: Division by zero in /Uno/test/pruebas/speedtest/results.php on line 110, referer: http://mi_sitio/pruebas/speedtest//download.php
    [Mon Sep 20 15:19:07 2010] [error] [client MI IP] PHP Warning: Division by zero in /Uno/test/pruebas/speedtest/results.php on line 115, referer: http://mi_sitio/pruebas/speedtest//download.php

  15. this is awesome,
    its runing and working..
    but how to make sure that this is accurate ?
    i try many times and the result show randomly

  16. Can you post an example for using the ‘Allow’ and ‘Disallow’ sections of the config file? Thanks, -D

  17. 1). EDIT /etc/httpd/conf/httpd.conf :

    ScriptAlias /speedtest/ “/home/speedtest/public_html/”
    Alias /speedtest-image/ “/home/speedtest/public_html/”

    Options +ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all

    2). EDIT /home/speedtest/public_html/speedtest.cfg:
    image_path = /speedtest-image/

    *Restart “httpd” , test your site 🙂

  18. What are the units of the speed? Is it Bits/second or Bytes/second. The only way it is consistent with my own download times is if it is in Bits/second. Would you verify this for me?

    I also assume that it downloads and uploads to my computer.

    Thanks.

  19. No matter what I try, I can’t get this to work.

    The closest I have come is the download.php notifying ‘Calculating appropriate file sizes for testing’, then returning to the Start page without printing any results. This is with all configs pointing to the speedtest directory.

    If I put upload.cgi in a separate directory and change the httpd.conf and speedtest.cfg files to reflect, I get 403 forbidden. The download test looks like it has run, as the URL in the 403 error page shows ‘…/cgi-bin/?downspeed=7186&downtime=0.114&downsize=100&auto_size=1’

    In either case, other CGI scripts run just fine from this same CGI directory on my XP box running Apache2.2.

  20. When I try [Start Test] I can see the application working and calculating the value for both criteria (upload/download).

    but when the process of calculate is over, appears the next message:
    “Fatal error: Call to undefined function mysql_connect() in /usr/local/www/apache22/data/speedtest/results.php on line 22”

    I see the script in this file and it seems ok, even when I try to do a direct connection to my data base I have no problems with it.

    mysql -u $user -p$password -h $host $db_name.
    Then I can’t finish my testing 🙁

    Best regards.

  21. Upload speed is not accurate.
    When i start test, download speed checks works fine but in upload speed it went till half stage and then suddenly hits the end.
    I am talking about progress bar, it reaches to half stage and then to 100% stage.
    always it suggests upload speed more than 3 times the download speed.
    in ADSL connection this is not possible. I think there is some problem in scripting/time calculation.

    Hemanshu

  22. Hi Brandon nice script, I got it working on my ubuntu 10.04 workstation 🙂 inside my private network, is there a way for me to disallow 5 or more IP address from my LAN in using the speed test? Thanks

  23. Brandon,

    Do you know what would cause this error?

    A critical error occurred: Unable to read configuration file: /speedtest/speedtest.cfg

  24. Thanks for the great tool. Is it possible to also add latency (and if possible traceroute) to the output results? I am trying to find a tool that would help me troubleshoot latency problems of my clients.

    Thanks again!

  25. Hi very useful script

    When I set, skip_upload = 1
    I get, Warning: Division by zero in /home/…download.php on line 66

    any idea why? thanks for making this available.

    SB

  26. Lovely bit of software, just what I needed for my server to help find out why friends abroad seemed to be experiencing slow downloads.
    Server running Centos 6, Apache 2.2, PHP 5.3, just copied software into place, set up config file and it worked, upload and download tests both working fine.

    Thank You
    Colin

  27. Worked great for me, converted it to a XOOPS module, found the permission otherwise know as forbidden would occur cause of the enabling of Execution of CGI in the .htaccess.

    Made a few nice changed, check out speedtest 1.01 beta for XOOPS based on this open source http://www.chronolabs.coop/articles/xoops-modules/speedtest-1-01/3,134,-1.html

    Download: http://bin.chronolabs.coop/xoops2.5_speedtest_1.01.zip
    Sourceforge: http://sourceforge.net/projects/chronolabs/files/XOOPS/Modules/speedtest/xoops2.5_speedtest_1.01.zip/download

  28. I’m trying to get this awesome script running, but still have Error 500 on upload.cgi 🙁
    I installed “sudo perl -MCPAN -e install Time::HiRes” already.
    Maybe you can help me to get this running?
    Twitter @seokai or mail from obove.

    Thanks a lot
    Kai

  29. I’ve got the same problem as TP (Feb, 3, 2011).
    DL and UL seems working but after the test finishes, it jumps to my main website (www.mypage.com) instead of showing the results page.

    Any help would be greatly appreciated!
    amanda

  30. I can get the measuring result displayed but there’re 6 lines of “Warning: Creating default object from empty value in /var/htdocs/speedtest/v2/common.php on line 26”
    Is there anything I should do?

  31. Hello,
    when i push “Start Test” i get
    Calculating appropriate file sizes for testing

    {‘general’}->{‘image_paest” meurlr.gif”funcinpwoulypd_tdisplaload_bar” /> splaupload_bar” /> splaupremud_b

    What i did wrong?

  32. Hello,
    after i push “Start test” i get :

    Calculating appropriate file sizes for testing

    {‘general’}->{‘image_paest” meurlr.gif”funcinpwoulypd_tdisplaload_bar” /> splaupload_bar” /> splaupremud_b

  33. Anyone having the same problem as TP or amanda, check permissions on your upload.cgi. It’s probably 644 default, change to 755. You may also have to add a couple lines to the .htaccess file, RewriteEngine On and Options +FollowSymLinks.

  34. Hi,

    Great project..I was able to set up successfully, however I am trying to pass a variable (customer name) from the welcome screen to the result page but it is not working. I used POST, Session, Javascript. Nothing works. Can you assist me?

    Thnks

  35. I’m getting the same error as Airef K
    Please advise!

    6 lines of “Warning: Creating default object from empty value in /var/htdocs/speedtest/v2/common.php on line 26″

  36. Great and accurate speedtest, but safari has issue of while redirecting through GET request and it doesnt come up with download.php page. Instead after you begin test it does the testing and comes up with final result page.

    That means it kind of skips displaying download page.

    any suggestions how to fix it?

    Many Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *