Jump to content

Bandwidth monitoring?


garethhall

Recommended Posts

Hi guys,

 

I need a little information :) I have written a php app and I occurred to that I need to track the bandwidth that the user is using. I have done a google search and looked through my php books but none of them seems to list anything of that kind. Maybe I am just looking in the wrong places? How can I simple echo the size?

Link to comment
https://forums.phpfreaks.com/topic/192102-bandwidth-monitoring/
Share on other sites

Hi Gareth. You will need to create a script that will dynamically/securely echo out a files contents along with it's meta data to the browser, while logging to your db the filesize using

http://uk2.php.net/manual/en/function.filesize.php

to get the file size. Personally I wouldnt log the data sent until the user completely downloads a file (since they won't have the complete file without doing so) however you could also update your db in real time (but not adviseable)

garethhall I am also looking for something similar. I am planning to use the following steps

  • saving each page size in db before its delivered to user
  • All the images, CSS files etc details will be saved in DB, and a special parser/code will be used to deliver them to user and on each request, it will increment the user bandwidth in db
  • using perl for uploading so I can provide the upload meter as well as monitor the amount of data being uploaded. even if the page is canceled/closed before the file is completely uploaded, I will be saving the partial file upload size

 

but I got no idea how to log ftp bandwidth.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.