Website in PHP with functionality to collect the current weather of different cities, use a third-party API.
07:00
21:00
Website in PHP with functionality to collect the current weather of different cities, use a third-party API.
Register on the page of https://www.tiempo.com/api/#/login to obtain the apikey.
Edit config in 'core/config.php and paste apikey.
$timeSet = 'Europe/Madrid';
$city = 313;
$apikey = '*****';
$background_navbar_day_color = '#2c568c';
$background_navbar_night_color = '#000000';
$background_day_color = '#457fca';
$background_night_color = '#212121';
$time_day_control_min = '07:00';
$time_day_control_max = '21:00';
2.1 - Explanation:
$timeSet -> Set the default time zone.
$city -> Default city on the main page.
$apikey -> Add your private api key https://www.tiempo.com/api
$background_navbar_day_color -> Default background nav bar color day.
$background_navbar_night_color -> Default background nav bar color night.
$background_day_color -> Default background div color day.
$background_night_color -> Default background div color night.
$time_day_control_min -> Start time of the day to change background.
$time_day_control_max -> End of day time day to change background.
Run.
http://davidespier.com/pages/weather/
Developed and designed by David Espier