A: 

Try checking this function out in the docs:

http://www.php.net/manual/en/function.fread.php#84115

Ashley
A: 

Have you looked into the curl extension?

Kalium
curl i wanna know how to log the user of how much bytes the user downlaoded
Saxtor
I'm pretty sure curl can track bytes transferred. Go read the documentation.
Kalium
i did can you explain how it would be possible then, to track bytes when a user downloads a file
Saxtor
Do you want to know how many bytes have been used in a server-to-server manner or how many the from the user to your server? In the case of the latter, PHP is probably the wrong tool. You want something at the webserver level.
Kalium