[ PHPXref.com ] [ Generated: Sun Jul 20 19:38:39 2008 ] [ phpFlickr 2.0.0 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> auth.php (source)

   1  <?
   2      /* Last updated with phpFlickr 1.3.1
   3       *
   4       * Edit these variables to reflect the values you need. $default_redirect 
   5       * and $permissions are only important if you are linking here instead of
   6       * using phpFlickr::auth() from another page or if you set the remember_uri
   7       * argument to false.
   8       */
   9      $api_key                 = "[your api key]";
  10      $api_secret              = "[your api secret]";
  11      $default_redirect        = "/";
  12      $permissions             = "read";
  13      $path_to_phpFlickr_class = "./";
  14  
  15      ob_start();
  16      require_once ($path_to_phpFlickr_class . "phpFlickr.php");
  17      unset($_SESSION['phpFlickr_auth_token']);
  18       
  19      if (!empty($_GET['extra'])) {
  20          $redirect = $_GET['extra'];
  21      }
  22      
  23      $f = new phpFlickr($api_key, $api_secret);
  24   
  25      if (empty($_GET['frob'])) {
  26          $f->auth($permissions, false);
  27      } else {
  28          $f->auth_getToken($_GET['frob']);
  29      }
  30      
  31      if (empty($redirect)) {
  32          header("Location: " . $default_redirect);
  33      } else {
  34          header("Location: " . $redirect);
  35      }
  36   
  37  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]