Skip to content

Instantly share code, notes, and snippets.

@seanwittmeyer
Created March 21, 2012 04:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanwittmeyer/2144378 to your computer and use it in GitHub Desktop.
Save seanwittmeyer/2144378 to your computer and use it in GitHub Desktop.
Temp Fetch
<?php
$handle = fopen("http://apple.accuweather.com/adcbin/apple/Apple_Weather_Data.asp?zipcode=80526", "r");
$contents = stream_get_contents($handle);
fclose($handle);
$weathersrc = new SimpleXMLElement($contents);
echo $weathersrc->CurrentConditions[0]->Temperature.'°F and '.$weathersrc->CurrentConditions[0]->WeatherText; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment