WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

wp_safe_remote_get() WP 3.6.0

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

This function is ideal when the HTTP request is being made to an arbitrary URL. The URL is validated to avoid redirection and request forgery attacks.

  • Смотрите: wp_remote_request() For more information on the response array format.
  • Смотрите: WP_Http::request() For default arguments information.

Хуков нет.


WP_Error/Массив. The response or WP_Error on failure.


wp_safe_remote_get( $url, $args );
$url(строка) (обязательный)
Site URL to retrieve.
Request arguments.
По умолчанию: empty array

Код wp safe remote get: wp-includes/http.php VER 5.1.1

function wp_safe_remote_get( $url, $args = array() ) {
	$args['reject_unsafe_urls'] = true;
	$http                       = _wp_http_get_object();
	return $http->get( $url, $args );