Created
May 30, 2013 19:12
-
-
Save mattclevyr/5680354 to your computer and use it in GitHub Desktop.
Clevyr Weather API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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