<pre>
<?php
/* In this demonstration we will be demonstrating how to authorize your application to use a Panacea Mobile user's account */
require_once("../../php/panacea_api.php"); // Let's just include the Panacea Api class (downloadable at http://www.panaceamobile.com/developers/sample-code/php/)
if(!empty($_GET['request_key'])) {
/* Great we have a request key, so let's get our authorization token! */
if($api->ok($token)) {
/* We have created an API Key, wahoo! */
$username = $token['details']['username'];
$key = $token['details']['key'];
/* Let's use it */
$api->setUsername($username);
$api->setPassword($key);
if($api->ok($balance)) {
echo "Your balance is {$balance['details']}\n";
}
} else {
echo "Not authorized\n";
}
} else {
echo "Not authorized\n";
}