I want to get the website bandwidth with PHP
get the information like this:
aaa.example.com 200g/m
bbb.example.com 150g/m
I don't think PHP have any standard tools to provide this data. You probably will have to set up custom logs for Apache where it will save subdomain and page size for all requests and then you will need to extract this data and present it with some statistical tool like Munin. Actually maybe someone already made a plugin for Munin that is doing just that, just try to google for it.