rendered paste body<?php /** * meter.php * * Main file for CMX-Networks * * @author Phillip Tanner <ptanner@cmx-networks.net> * @link http://www.cmx-networks.net * @since March 10, 2006 * @version $Revision: 1.0 $ * @package CodeName : Source * */ session_start(); $Title = 'ServerTell'; $ContentTitle = 'Home'; require ('Include/Functions.php'); include_once("config.inc.php"); if ( !$conn ) { $content = 'Error: No Connection to MySQL Server.'; } else { $content = '<br><br><br><center><b><font size="2" face="Verdana">Conducting bandwidth test</b><br>Please wait...</center><br> <script> <!-- time = new Date(); starttime = time.getTime(); // --> </script> '. $data_file = "payload.bin"; $fd = fopen ($data_file, "rb"); if (isset($_GET['kbps'])) { $test_kbytes = ($_GET['kbps'] / 8) * 10; //set the download to take 10 seconds if ($test_kbytes > 3000) { $test_kbytes = 3000; } } else { $test_kbytes = $default_kbyte_test_size; } $contents = fread ($fd, $test_kbytes * 1024); echo "<!-- $contents -->"; fclose ($fd); .' test'; } parse_var(); ?>