Gen. partnerAlgotech

PHP function get_headers()

Fetches all the headers sent by the server in response to a HTTP request

|
September 11, 2019

Availability in PHP 5.0

Fetches all the headers sent by the server in response to a HTTP request

Parameters

Parameter Data type Default value Note
$url string not The target URL.
$format int null, If the optional format parameter is set to non-zero, get_headers parses the response and sets the array's keys.
$context resource not

Return values

array

an indexed or associative array with the headers, or false on failure.

Other resources

Official get-headers documentation

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.