<?php include_once 'lib/qqauth/autoload.php'; session_start(); $url = QQAuth_Operation::getAuth(false, 'www.oh4399.com/qqauth/callback.php'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="en" /> <meta name="GENERATOR" content="PHPEclipse 1.2.0" /> <title>title</title> </head> <body> <a href="<?php echo $url; ?> ">登录</a> </body> </html>
<?php /* * Created on 2012-2-28 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ include_once 'lib/qqauth/autoload.php'; session_start(); $auth_code = QQAuth_Operation::handleAuthCallback(); print_r($auth_code); /* $api = new QQAuth_API; $user_info = $api->process('get_user_info'); echo '<pre>'; echo 'User Info:'; print_r($user_info); $fans_list = $api->process('get_fanslist', array('reqnum' => 10, 'startindex' => 0, 'mode'=> 1)); echo 'Fans List:'; print_r($fans_list); $info = $api->process('get_info'); echo 'Info:'; print_r($info); $info = QQAuth_API::process('get_info'); echo 'Info:'; print_r($info);