How do I view all options of the weather output: weather: "Partly Cloudy"?

  • 1
  • Question
  • Updated 4 years ago
What are the variables?
Photo of marcusm

marcusm

  • 2 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 1
Photo of Tim Roche

Tim Roche, Official Rep

  • 322 Posts
  • 31 Reply Likes
It might be better to use the icon mapping for mapping purposes, this text data can change
Photo of marcusm

marcusm

  • 2 Posts
  • 0 Reply Likes
Thanks! I can do that. Is there a list of all of the options anywhere? That way if it is "raining" then the application can respond accordingly
Photo of Tim Roche

Tim Roche, Official Rep

  • 322 Posts
  • 31 Reply Likes
you should be able to suss it out from the actual icons

http://www.wunderground.com/weather/api/d/docs?d=resources/icon-sets
Photo of waq619

waq619

  • 1 Post
  • 0 Reply Likes
how do i display the image from the url
this is my code
$json_string = file_get_contents("http://api.wunderground.com/api/key/g...");
$parsed_json = json_decode($json_string);
$location = $parsed_json->{'location'}->{'city'};
$temp_c = $parsed_json->{'current_observation'}->{'temp_c'};
$icon_url = $parsed_json->{'current_observation'}->{'icon_url'};
echo "Current temperature in ${location} is: ${temp_c} ${icon_url}";

on the browser we see

Current temperature in Leeds is: 9.7 http://icons.wxug.com/i/c/k/nt_rain.gif
we dont see the image, we see the url to the icon instead