Skip to content

Commit

Permalink
Merge pull request #7 from eeroniemi/master
Browse files Browse the repository at this point in the history
Minor improvements to examples bootstrap.php
  • Loading branch information
Ben Tadiar committed Jan 27, 2012
2 parents 95c1f7f + 4a49e79 commit 86d307c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/bootstrap.php
Expand Up @@ -11,7 +11,8 @@
}

// Don't allow direct access to the boostrap
if(basename($_SERVER['REQUEST_URI']) == 'bootstrap.php'){
if(basename($_SERVER['REQUEST_URI']) == 'bootstrap.php')
{
exit('bootstrap.php does nothing on its own. Please see the examples provided');
}

Expand All @@ -29,7 +30,9 @@
// Set your consumer key, secret and callback URL
$key = 'XXXXXXXXXXXXXXX';
$secret = 'XXXXXXXXXXXXXXX';
$callback = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

$protocol = (!empty($_SERVER['HTTPS'])) ? 'https' : 'http';
$callback = $protocol . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

// Instantiate the required Dropbox objects
$encrypter = new \Dropbox\OAuth\Storage\Encrypter('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
Expand Down

0 comments on commit 86d307c

Please sign in to comment.