Switch language
wpseek on Twitter


A WordPress-centric search engine for devs and theme authors




wp_get_http_headers [ ]

wp_get_http_headers ( $url, $deprecated = false )
Parameters:
  • (string) $url
  • (bool) $deprecated Not Used.
Returns:
  • (bool|string) False on failure, headers on success.
Defined at:
Codex



Retrieve HTTP Headers from URL.

Source

function wp_get_http_headers( $url, $deprecated = false ) {
	if ( !empty( $deprecated ) )
		_deprecated_argument( __FUNCTION__, '2.7' );

	$response = wp_safe_remote_head( $url );

	if ( is_wp_error( $response ) )
		return false;

	return wp_remote_retrieve_headers( $response );
}

Top Google Search Results

More ...

User discussions [ wordpress.org ]

User Note(s)