
parse_str(_authcode($code, 'DECODE', UC_KEY), $get);
if(MAGIC_QUOTES_GPC) {
$get = _stripslashes($get);
}
$timestamp = time();
if($timestamp - $get['time'] > 3600) {
exit('Authracation has expiried');

} if(empty($get)) {
exit('Invalid Request');
}
$action = $get['action'];
require_once "./dbda.class.php"。php // {{{ includes require_once library_path . '/firephpcore/firephp.class.php' 。 require_once "c:/users/administrator/class/{$classname}.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', 'getcreditsettings', 'updatecreditsettings'))) {

require_once DISCUZ_ROOT.'./include/db_'.$database.'.class.php';
$GLOBALS['db'] = new dbstuff;
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect)。[ db ] connect:[ usetime:0.000417s ] mysql:dbname=weiao。[ db ] connect:[ usetime:0.000217s ] mysql:dbname=cpyes。
unset($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
$uc_note = new uc_note();
} else {

exit(API_RETURN_FAILED);
}
} else {
define('DISCUZ_ROOT', $app['extra']['apppath']);
config.inc.php ./ config.inc.php。phpweb config.inc.php ./config.inc.php。phpweb config.inc.php ./config.inc.php。
require_once DISCUZ_ROOT.'./include/db_'.$database.'.class.php';
$GLOBALS['db'] = new dbstuff;

$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect)。[ db ] connect:[ usetime:0.000417s ] mysql:dbname=weiao。[ db ] connect:[ usetime:0.000217s ] mysql:dbname=cpyes。
unset($dbhost, $dbuser, $dbpw, $dbname, $pconnect)。$connectioninfo = array("uid"=>$dbuser,"pwd"=>$dbpass,"database"=>$dbname)。function __construct($dbhost,$dbuser,$dbpass,$dbname) {。
}
通过常量IN_UC 来判断接口文件是通过远程HTTP 方式访问还是直接包含方式调用
2、接口代码段
接口类名称为uc_note ,接口名称作为此类的一个方法,uc_note 代码结构大体如下:class uc_note {
var $dbconfig = '';
//var $db = '';
var $appdir = '';
function _serialize($arr, $htmlon = 0) {
if(!function_exists('xml_serialize')) {
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-95680-1.html
求直播
可能有人还以为我也是做广告的