weather: add url to user agent.

As per met.no request.
This commit is contained in:
Alastair Poole 2021-03-09 15:41:39 +00:00
parent 16b2bdc289
commit e498262365
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ function weather_get($lat, $lon)
$url = "https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=$lat&lon=$lon";
$c = curl_init();
curl_setopt($c, CURLOPT_USERAGENT, "eWeatherProxy/1.0");
curl_setopt($c, CURLOPT_USERAGENT, "eWeatherProxy/1.0 (www.enlightenment.org)");
curl_setopt($c, CURLOPT_URL, $url);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);