Skip to content

Instantly share code, notes, and snippets.

@timhodson
Created February 20, 2012 16:15
Show Gist options
  • Save timhodson/1869952 to your computer and use it in GitHub Desktop.
Save timhodson/1869952 to your computer and use it in GitHub Desktop.
PHP: Retrieve Kasabi apikey from shell environment
// 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