The given PHP example fetches all the headers sent by the server in response to a HTTP request. If the optional format parameter is set to 1, get_headers() parses the response and sets the array's keys. Code Example:
<?php $url = 'http://www.example.com'; print_r(get_headers($url)); print_r(get_headers($url, 1)); ?>