topical media & game development

talk show tell print

mashup-flickr-08-Complete-auth.php / php



  <?php 
  
  include (dirname(__FILE__) . '/lib/apikey.php');
  include (dirname(__FILE__) . '/lib/phpFlickr/phpFlickr.php');
  include (dirname(__FILE__) . '/lib/FlickrAuthenticator.php');
  
  frob = _REQUEST['frob'];
  extra = _REQUEST['extra'];
  auth = new FlickrAuthenticator(flickrApiKey, flickrApiSecret);
  redirect = '/';
  
  if (!empty(frob)) 
  {
    auth->updateCredentials(frob);
  
    if (!empty(extra))
    {
      redirect = extra;
    }
  }
  
  header('Location: http://'.$_SERVER['HTTP_HOST'] .redirect);
  
  ?>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.