oraclelee
- oraclelee 2015-04-14 已签到连续签到1天,获得了5个金钱
请问这个
$cookie['Example_auth']
来自于什么地方呢?
这个cookie来自discuz?还是自己的应用网站?
如果是自己的应用网站,那么这里肯定什么时候也不满足条件。如果是来自discuz?这又是该怎么解决呢?[attach]977[/attach]
哈哈 我整合通信成功啦。
终于解决啦,稍后会放出全部的说明。
那怎么搞呢、放到其他目录?
路径问题?
protected 下面的api的 uc.php 不能直接访问,访问会发生错误,出现404错误。自己在顶顶。。。
因为 discuz ! x 2.5 里用的是ucenter 1.6 所以代码有些不一样。这是我改的:
error_reporting(0); define('UC_CLIENT_VERSION', '1.6.0'); define('UC_CLIENT_RELEASE', '20110501'); define('API_DELETEUSER', 1); define('API_RENAMEUSER', 1); define('API_GETTAG', 1); define('API_SYNLOGIN', 1); define('API_SYNLOGOUT', 1); define('API_UPDATEPW', 1); define('API_UPDATEBADWORDS', 1); define('API_UPDATEHOSTS', 1); define('API_UPDATEAPPS', 1); define('API_UPDATECLIENT', 1); define('API_UPDATECREDIT', 1); define('API_GETCREDIT', 1); define('API_GETCREDITSETTINGS', 1); define('API_UPDATECREDITSETTINGS', 1); define('API_ADDFEED', 1); define('API_RETURN_SUCCEED', '1'); define('API_RETURN_FAILED', '-1'); define('API_RETURN_FORBIDDEN', '1'); define('IN_API', true); define('CURSCRIPT', 'api'); define('DISCUZ_ROOT', '../'); if(!defined('IN_UC')) { //require_once '../source/class/class_core.php'; //$discuz = C::app(); //$discuz->init(); require DISCUZ_ROOT.'./config.inc.php'; $get = $post = array(); $code = @$_GET['code']; parse_str(authcode($code, 'DECODE', UC_KEY), $get); if(time() - $get['time'] > 3600) { exit('Authracation has expiried'); } if(empty($get)) { exit('Invalid Request'); } include_once DISCUZ_ROOT.'./uc_client/lib/xml.class.php'; $post = xml_unserialize(file_get_contents('php://input')); if(in_array($get['action'], array('test', 'deleteuser', 'renameuser', 'gettag', 'synlogin', 'synlogout', 'updatepw', 'updatebadwords', 'updatehosts', 'updateapps', 'updateclient', 'updatecredit', 'getcredit', 'getcreditsettings', 'updatecreditsettings', 'addfeed'))) { require_once DISCUZ_ROOT.'./include/db_mysql.class.php'; $GLOBALS['db'] = new dbstuff; $GLOBALS['db']->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect, true, $dbcharset); $GLOBALS['tablepre'] = $tablepre; unset($dbhost, $dbuser, $dbpw, $dbname, $pconnect); $uc_note = new uc_note(); exit($uc_note->$get['action']($get, $post)); } else { exit(API_RETURN_FAILED); } } else { //exit; require_once DISCUZ_ROOT.'./config.inc.php'; require_once DISCUZ_ROOT.'./include/db_mysql.class.php'; $GLOBALS['db'] = new dbstuff; $GLOBALS['db']->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect, true, $dbcharset); $GLOBALS['tablepre'] = $tablepre; unset($dbhost, $dbuser, $dbpw, $dbname, $pconnect); }
[attach]976[/attach]