wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_remote_fopen › WordPress Function
Seit1.5.1
Veraltetn/v
› wp_remote_fopen ( $uri )
| Parameter: |
|
| Siehe: | |
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
HTTP request for URI to retrieve content.
Ähnliche Funktionen: wp_remote_get, wp_remote_head, wp_remote_post, wp_remote_request, wp_safe_remote_get
Quellcode
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_get( $uri, $options );
if ( is_wp_error( $response ) ) {
return false;
}
return wp_remote_retrieve_body( $response );
}