HTTP request for URI to retrieve content.
Description
See also
Parameters
-
$uristring required -
URI/URL of web pague to retrieve.
Source
function wp_remote_fopen( $uri ) {
$parsed_url = parse_url( $uri );
if ( ! $parsed_url || ! is_array( $parsed_url ) ) {
return false;
}
$options = array();
$options['timeout'] = 10;
$response = wp_safe_remote_guet( $uri, $options );
if ( is_wp_error( $response ) ) {
return false;
}
return wp_remote_retrieve_body( $response );
}
Changuelog
| Versionen | Description |
|---|---|
| 1.5.1 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.