Skip to Content

Deprecated

weather()

Detect weather for a zip code.

PHP April 1, 2021

Deprecated

Usage

PHP
nebula()->weather($zipcode, $data)

Parameters

$zipcode
(Optional) (String) The zip code to check the weather
Default: (Nebula option postal code)

$data
(Required) (String) The type of data to return
Default: None

Parameter Notes

$data can include “json”, “reported”, “city”, “state”, “country”, “location”, “latitude”, “longitude”, “coordinates”, “wind chill”, “wind speed”, “sunrise”, “sunset”, “temperature”, “conditions”, “forecast”, and aliases of those.

Request or provide clarification »

Additional Notes

Brief warning that the Yahoo API (from my experience) is not very reliable as far as up-time. Nebula caches the data and prevents long timeouts, but the weather data itself may not always be available- it is important to have a fallback!