wp_get_http


wp_get_http ( $url, $file_path = false, $red = 1 )

Parameters:
  • (string) $url URL to fetch.
  • (string|bool) $file_path Optional. File path to write request to. Default false.
  • (int) $red Optional. The number of Redirects followed, Upon 5 being hit, returns false. Default 1.
See:
  • WP_Http
Returns:
  • (bool|string) False on failure and string of headers if HEAD request.
Defined at:

Description

Perform a HTTP HEAD or GET request.

If $file_path is a writable filename, this will do a GET request and write the file to that path.

Related Functions

wp_get_ext_types, wp_get_http_headers, wp_get_sites, wp_get_theme, wp_get_shortlink

Top Google Results

User discussions

wpseek mobile