#!/usr/bin/perl # Title: SCTelcom Speed Test # Version: 1.1 # Credit: Nicholas Marsh # Date: 12/08/2003 # Purpose: Test Internet connection speed. # OS: Linux with Perl. # Notes: # No function param will redirect to function = 1. # Changes since 1.0: # Moved to http://speedtest.sctelcom.net # Step 1 - User calls speedtest.cgi # Step 2 - Function 1 calculates the download time. # Step 3 - Function 2 factors the size/time equation to get speed. # Step 4 - Dump results to browser. # Modules use strict; use warnings; use CGI qw(:standard); # Settings my $function=param('function'); #my $baseurl='http://www.sctelcom.com/cgi-bin/speedtest.cgi'; my $baseurl='http://speedtest.sctelcom.net/localhost/speedtest.cgi'; # Exit/error codes: my $error1=" "; my $error2=" "; my $error3=" "; my $error4=" "; my $error5=" "; my $error6=" "; my $error7=" "; my $error8=" "; my $error9=" "; # Check for function paramaters. if ($function == 1) { print(header()); testpage($baseurl); } elsif ($function == 2) { my $time=param('loadtime'); my $kbps=sprintf("%1.2f", 463331 / $time / 100); my $mbps=sprintf("%1.2f", 463331 / $time / 100000); print(header()); resultspage($kbps, $mbps); } else { my $url="$baseurl?function=1"; print(header()); print(''); } # HTML Source for the download test. sub testpage { print< SCTelcom Speed Test
Please wait while we test your connection...
ENDOFHTML } # HTML Source for the results page. sub resultspage { print< SCTelcom Speed Test

SCTelcom Speed Test

Speed Test Results 

$_[0] Kbps
$_[1] Mbps

Click Here to test again.

Frequently asked questions

Q: What do these results mean?
A: Kilo-bits per a second (Kbps) and Mega-bits per a second (Mbps) are the unit of measurement used to determine bandwidth. Speeds slower than 56 Kbps are typical for dialup customers. Speeds up to 384 Kbps are typical for Bronze DSL customers. Speeds up to 786 Kbps are typical for Silver DSL customers. Speeds up to 1.5 Mbps (1500 Kbps) are typical for Gold DSL customers.

Q: Why is my connection so slow?
A: There are many factors than can cause a slow connection. If your connection seems slow, try rebooting your computer and testing again. If you still have problems contact the SCTelcom help desk at 1-866-728-1800.

Q: How can I get a faster connection?
A: Dial-up customers can upgrade to SCTelcom DSL service for speeds up to 100 times faster than dial-up. Bronze DSL customers can double or triple their connection speed by upgrading to DSL Silver or DSL Gold. Call 1-866-728-1800 for details.

Copyright © 2003 SCTelcom

ENDOFHTML } exit 0