Index of /~sebek/phpbwmeter

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[TXT]ChangeLog.txt2018-05-02 13:07 152  
[TXT]README.txt2018-05-02 13:07 1.4K 
[   ]example1.php2018-05-02 13:07 1.2K 
[   ]example2.php2018-05-02 13:07 1.9K 
[   ]example3.php2018-05-02 13:07 2.5K 
[   ]phpbwmeter-1.0.tar.gz2018-05-02 13:07 4.0K 
[   ]phpbwmeter-1.1.tar.gz2018-05-02 13:07 4.2K 
[TXT]phpbwmeter.js2018-05-02 13:07 8.1K 
[   ]phpbwmeter.php2018-05-02 13:07 602  

PHP BWmeter is a simple tool for measuring available
network bandwidth between your computer and the test web server.
It's using JavaScript/AJAX on the browser side for measurements and PHP
on the server side for test data generation. The script is really simple,
so it should be trivial to use cgi/python/whatever instead.

See "example*" files for examples on how to use the script. If you don't want
to spend much time on setting it up, just copy any of the examples, they should
work out of the box.

A very basic BWmeter use in an HTML page is:

<html><body>
Upload: <span id="upload"></span><br/>
Download: <span id="download"></span><br/>
<script language="javascript" type="text/javascript" src="phpbwmeter.js">
</script>
<script language="javascript" type="text/javascript">
phpbwmeter_run("phpbwmeter.php", 2048, "upload", "download");
</script>
</body></html>

phpbwmeter_run takes 4 arguments:
- relative location to phpbwmeter.php script
- data size (in KB)
- id of element to fill with upload stats
- id of element to fill with download stats

For more information, see comments in phpbwmeter.js.

By default data size is limited to 10MB in the phpbwmeter.php file.

Some caveats:
- upload is limited by post_max_size in php.ini
- if your web server has compression enabled for output, download speed results
  will be completely bogus. Disable compression - for Apache I did it by setting
  SetEnv no-gzip dont-vary
  in .htaccess