21.01.2019, 15:52
Hello, I've got a problem with the function HTTP. I'm trying to get some information to a website with SSL.
Website: https://samples.openweathermap.org/data/2.5/weather
When I paste this URL into my browser, it work perfectly. But for the script, it return me an error:
Thank's you
Website: https://samples.openweathermap.org/data/2.5/weather
When I paste this URL into my browser, it work perfectly. But for the script, it return me an error:
Code:
<html> <head><title>301 Moved Permanently</title></head> <body bgcolor="white"> <center><h1>301 Moved Permanently</h1></center> <hr><center>openresty/1.9.7.1</center> </body> </html>
PHP Code:
format(string, sizeof(string), "%s?id=%d&appid=%s", API_URL, CITY_CODE, API_KEY);
printf("string: %s", string);
HTTP(-1, HTTP_GET, string, "", "weather_response");
