Created
February 20, 2012 16:15
-
-
Save timhodson/1869952 to your computer and use it in GitHub Desktop.
PHP: Retrieve Kasabi apikey from shell environment
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
// set some kasabi variables | |
$kasabi_api_base = "http://api.kasabi.com"; | |
$kasabi_api_key = getenv('KASABI_API_KEY'); | |
// now use the key in anger | |
$my_query = "grilled fish"; | |
$my_url = $kasabi_api_base."/dataset/food/apis/search?query=".urlencode($my_query)."&apikey=".$kasabi_api_key; | |
// now do something amazing... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment