예제 #1
0
                $attach_images[] = $image['big'];
            }
            $_G['gp_attach_image'] = implode('|', $attach_images);
            unset($attach_images);
        }
    }
} elseif ($pluginop == 'new') {
    $sh_type = trim(intval($_G['gp_sh_type']));
    $tid = trim(intval($_G['gp_thread_id']));
    $dialog_id = $_G['gp_dialog_id'];
    $sync_post = $_G['gp_sync_post'];
    connect_merge_member();
    $api_url = $_G['connect']['api_url'] . '/connect/share/new';
    $extra = array();
    $extra['oauth_token'] = $_G['member']['conuin'];
    $sig_params = connect_get_oauth_signature_params($extra);
    $oauth_token_secret = $_G['member']['conuinsecret'];
    $sig_params['oauth_signature'] = connect_get_oauth_signature($api_url, $sig_params, 'POST', $oauth_token_secret);
    $params['sh_type'] = $sh_type;
    $params['subject'] = $_G['gp_subject'];
    $params['share_subject'] = $_G['gp_share_subject'];
    $params['thread_id'] = $_G['gp_thread_id'];
    $params['author'] = $_G['gp_author'];
    $params['author_id'] = $_G['gp_author_id'];
    $params['forum_id'] = $_G['gp_forum_id'];
    $params['p_id'] = $_G['gp_post_id'];
    $parmas['u_id'] = $_G['uid'];
    $params['reason'] = $_G['gp_reason'];
    $params['content'] = $_G['gp_html_content'];
    $params['client_ip'] = $_G['clientip'];
    $params['attach_images'] = $_G['gp_attach_image'];
예제 #2
0
function connect_get_access_token($request_token, $verify_code)
{
    global $_G;
    $api_url = $_G['connect']['api_url'] . '/oauth/accessToken';
    $extra = array();
    $extra['oauth_token'] = $request_token;
    $extra['oauth_verifier'] = $verify_code;
    $sig_params = connect_get_oauth_signature_params($extra);
    $oauth_token_secret = $_G['cookie']['con_request_token_secret'];
    $sig_params['oauth_signature'] = connect_get_oauth_signature($api_url, $sig_params, 'POST', $oauth_token_secret);
    $params = array('client_ip' => $_G['clientip']);
    $params = array_merge($sig_params, $params);
    dsetcookie('con_request_token');
    dsetcookie('con_request_token_secret');
    $response = connect_output_php($api_url . '?', cloud_http_build_query($params, '', '&'));
    return $response;
}