Advertisements

wp_get_http_headers

Definition:
function wp_get_http_headers( $url, $deprecated = false ) {}

Retrieve HTTP Headers from URL.

Parameters

  • string $url
  • bool $deprecated: Not Used.

Return values

returns:False on failure, headers on success.

Source code

function wp_get_http_headers( $url, $deprecated = false ) {

	if ( !empty( $deprecated ) )

		_deprecated_argument( __FUNCTION__, '2.7' );



	$response = wp_remote_head( $url );



	if ( is_wp_error( $response ) )

		return false;



	return wp_remote_retrieve_headers( $response );

}

3705

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: