Have a look at apache mod_ratelimit if you want to "bandwidth rate limit" pages. It works per request, so you need to figure out to whom is a request destined to and then set the limit as required.
The web server is the place to do this, you only need to use php to control it.
Also, as per my comment, if it's for APIs and web services, I'd "request rate limit" them. When they've done n requests in last t seconds, return Server Busy.
Bandwidth rate limiting only effective for large responses, like for KBs of data transfer. For small responses, like API responses, it won't have any effect.