Ferry Krauweel Fotografie

/** @var array|WP_Error $response */
$response = wp_remote_get( ‘https://api.weather.com/v2/pws/dailysummary/7day?stationId=IZUIDB11&format=json&units=e&apiKey=8212627cc909414492627cc9096144c5’ );

if ( is_array( $response ) && ! is_wp_error( $response ) ) {
$headers = $response[‘headers’]; // array of http header lines
$body = $response[‘body’]; // use the content
}

© 2024 Ferry Krauweel Fotografie

Thema door Anders Norén