CDYNE Weather

From CDYNE Wiki for Web Services
Jump to: navigation, search

Contents

Description

CDYNE Weather is a free SOAP Web Service that provides you with up to date weather information in the United States. This information is derived from the National Oceanic and Atmospheric Administration's (NOAA) National Weather service into a clean and easy to parse XML format. The first method offers the city's weather by zip code, and the second shows the weather station's 7 day forecast by zip code. This free Weather Web Service also comes standard with hyperlinks that show images (GIF) of the day's weather conditions, so you can show off your application with visual representations. This service offers two methods:

Weather.jpg

Weather Visuals Download

Notes

CDYNE considers this service a form of advertising its commercial APIs and is hosted on the same redundant servers. CDYNE will continue to update this service as a part of its offering. If for some reason you cannot receive data on a particular weather station or from city information, please inquire.

RECENT CHANGE: We had a recent change to our free services. Please make sure you change the API URL from ws.cdyne.com to wsf.cdyne.com as seen below.

Developer/Tester Information

PHP Example

class Weather {
	public $ZipCode;
	public $response;
	
 	public function __construct($ZipCode) {
		$this->ZipCode = $ZipCode;
		$this->getResponse();
	}
	public function getResponse(){
		$url = "http://wsf.cdyne.com/WeatherWS/Weather.asmx/GetCityForecastByZIP";
		$url .= "?ZIP=" . $this->ZipCode;
		$this->response = simplexml_load_file($url) or die("ERROR");
	}
 }
 
 $weather = new Weather("23454");
 var_dump($weather);

Example Source Code

Personal tools
Toolbox





Trial Key