WordPress at a glance

wp_remote_get() WP 1.0

Retrieve the raw response from the HTTP request using the GET method.

  • See: wp_remote_request() For more information on the response array format.
  • See: WP_Http::request() For default arguments information.

No Hooks.

Return

WP_Error/Array. The response or WP_Error on failure.

Usage

wp_remote_get( $url, $args );
$url(string) (required)
Site URL to retrieve.
$args(array)
Request arguments.
Default: empty array

Code of wp_remote_get: wp-includes/http.php VER 5.0

<?php
function wp_remote_get($url, $args = array()) {
	$http = _wp_http_get_object();
	return $http->get( $url, $args );
}

Related Functions

From tag: HTTP API (curl remote)

No comments
    Hello, !     Log In . Register