Created
July 26, 2015 14:03
-
-
Save proudlygeek/fd521c0188ca45231266 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
$apiKey = getenv('OPENWM_API_KEY') || file_get_contents( 'apikey'); | |
$apiURL = 'http://api.openweathermap.org/data/2.5/forecast/daily'; | |
$lat = $_GET[ 'lat' ]; | |
$lon = $_GET[ 'lon' ]; | |
echo file_get_contents( $apiURL . '?lat=' . $lat . '&lon=' . $lon . '&units=metric&cnt=1&APPID=' . $apiKey ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment