0

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?

Irfan Mir
  • 2,107
  • 8
  • 27
  • 33
  • Why not simply use your logfiles for this? – Paul Dixon Apr 28 '13 at 18:48
  • Why don't you just use something that costs a few more bucks so you don't have to worry about this? Your performance is going to be a pain in the ass for the user anyway. – Jonast92 Apr 28 '13 at 18:51

1 Answers1

0

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.

nikoskip
  • 1,860
  • 1
  • 21
  • 38