Search code examples
phpbandwidth

Measure bandwith used by PHP


I am wondering how to measure bandwidth in PHP. I am going to start measuring when the page loads and up until a form is filled and submitted. Then when the confirmation page is returned, in that page I will stop measuring and display, how much bandwidth was used probably by echoing a variable.

I am doing this because I have a strict bandwidth limit on the server space that I am purchasing.

How can I do this?


Solution

  • strict bandwidth? get another hosting provider... and to be realistic, you shouldn't worry about how much bandwidth is consuming PHP, try to optimize your images, css, js (minified them) and html files.