Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$access_key = 'your_key';
$opts = array(
'http' => array(
'method' => 'GET',
'header' => 'X-Yandex-Weather-Key: ' . $access_key
)
);
$context = stream_context_create($opts);
$file =
file_get_contents('https://api.weather.yandex.ru/v2/forecast?lat=52.37125&lon=4.89388',
false, $context);
echo $file;