This is really not the kind of thing you would want to do with server-side code, like PHP. Testing other site's HTTP headers are just not something the makers of PHP had in mind when they were designing it.
Also, most hosting companies have servers that they configure to be as safe and use as few resources as possible. Since making HTTP requests with PHP takes more resources than internal requests, many hosts will disable it.
You may try http://www.scrutinizethis.com for a tool that would do something similar.
Sorry if that wasn't the answer you were looking for, but the most important thing in programming is to use the right tools for the right project.