Name
get_headers
Synopsis
array get_headers(stringurl
[, intformat
])
Returns an array of headers that are sent by the remote server
for the page given in url
. If
format
is 0
or not set, the headers are returned in a
simple array, with each entry in the array corresponding to a single
header. If format
is set and is
1
, an associative array is returned
with keys and values corresponding to the header fields.
Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.