Hello everybody
because am very new with wunder weather API i have a question .
Until now i have this script :
$json_string = file_get_contents("http://api.wunderground.com/api/1ac33...");
$parsed_json = json_decode($json_string);
$location = $parsed_json->{'location'}->{'city'};
$icon = $parsed_json->{'current_observation'}->{'icon'};
$temp_c = $parsed_json->{'current_observation'}->{'temp_c'};
echo " Weather now : ${temp_c} C $icon \n";
My question is, how can i show an icon for my current conditions ?
I know that here are the icon sets http://www.wunderground.com/weather/a... but i dont know how to use them into my code !
Can you please help me with a small sample of php-code using icons ?
Thanks in advance
because am very new with wunder weather API i have a question .
Until now i have this script :
$json_string = file_get_contents("http://api.wunderground.com/api/1ac33...");
$parsed_json = json_decode($json_string);
$location = $parsed_json->{'location'}->{'city'};
$icon = $parsed_json->{'current_observation'}->{'icon'};
$temp_c = $parsed_json->{'current_observation'}->{'temp_c'};
echo " Weather now : ${temp_c} C $icon \n";
My question is, how can i show an icon for my current conditions ?
I know that here are the icon sets http://www.wunderground.com/weather/a... but i dont know how to use them into my code !
Can you please help me with a small sample of php-code using icons ?
Thanks in advance