Location: PHPKode > scripts > Yahoo BBAuth > yahoo-bbauth/index.php
<?php

//implementing lazy loading
function __autoload($class){
    include_once("class.".$class.".php");
}

$YahooAppID=".lND7LnIkY5jBHPMGmMhBBkWWpbJ6_gew9XLo.B5.d8-"; //your AppID will be here
$YahooSecret="555060ec4069cf7f67ddb84339f8701c"; //your Secret key goes here

$obj= new YahooAuth(); //Instantiating the class

if (isset($_GET['token']) && isset($_GET['appid'])){
    $obj->get_credentials($_GET['token']);
}elseif(isset($_GET['logout'])){
    unset($_SESSION['valid_user']);
}

if ($_SESSION['valid_user']){
    echo "Congratulation! You are logged in.<br \>";
    echo "<a href='".$_SERVER['PHP_SELF']."?logout'>LogOut</a><br \>";
    echo "<pre>";
    print_r($_SESSION);
    echo "</pre>";
}else{
    echo "You are not logged in.<br \>";
    echo "<a href='".$obj->generate_url()."'>Click Here to logIn</a>";
}
?>
Return current item: Yahoo BBAuth