Skip to content

Instantly share code, notes, and snippets.

@mattclevyr
Created May 30, 2013 19:12
Show Gist options
  • Save mattclevyr/5680354 to your computer and use it in GitHub Desktop.
Save mattclevyr/5680354 to your computer and use it in GitHub Desktop.
Clevyr Weather API
<?php
include 'core/init.php';
echo "<pre>";
if(!empty($_GET['location']) == true && !empty($_GET['degree']) == true){
$data = GetWeatherData($_GET['location'], "en-US", $_GET['degree']);
if($data == false){
echo '{"LocationName":"false"}';
} else {
unset($data['CurrentData']['skyCode']);
print_r(json_encode(array_splice($data, 0, -5)));
}
}
echo "</pre>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment