Along with the release of our request_uri for IIS yesterday, we have another useful tip for a second function commonly found in WordPress plugins and other PHP redistributable scripts. apache_response_headers is used to get a list of all the headers sent out by a page, in the format of an associative array.
IIS doesn’t use this function, and before PHP5, there was no way to properly emulate its behavior. But on PHP5, it’s nothing too difficult. Without further ado, here’s the code: