<?php



/***************************************************************************

 *

 * Copyright (c) 2012 Baidu.com, Inc. All Rights Reserved

 *

 **************************************************************************/



require_once('Baidu.php');



/* 配置下面这三行 */

$clientId = '';

$clientSecret = '';

$domain = '';



















if (!isset($web['path'])) {

  require_once('../../writable/set/set.php');

}

$redirectUri = $web['path'].''.(strstr($web['path'], 'login_key/baidu/') ? 'callback.php' : 'login_key/baidu/callback.php');

$baidu = new Baidu($clientId, $clientSecret, $redirectUri, new BaiduCookieStore($clientId));

$user = $baidu->getLoggedInUser();

?>