function getdata($url, $parameters)
{
    global $cont_access_token, $code_app, $informe_errores;
    do {
        $signature = getsignature($url, $parameters);
        $oauth_header = '';
        $oauth_header .= 'oauth_consumer_key="' . $code_app[$cont_access_token]['Consumer_Key'] . '",';
        $oauth_header .= 'oauth_nonce="' . time() . '", ';
        $oauth_header .= 'oauth_signature="' . $signature . '", ';
        $oauth_header .= 'oauth_signature_method="HMAC-SHA1", ';
        $oauth_header .= 'oauth_timestamp="' . time() . '", ';
        $oauth_header .= 'oauth_token="' . $code_app[$cont_access_token]['Access_Token'] . '", ';
        $oauth_header .= 'oauth_version="1.0", ';
        $curl_header = array("Authorization: Oauth {$oauth_header}", 'Expect:');
        $curl_request = curl_init();
        curl_setopt($curl_request, CURLOPT_HTTPHEADER, $curl_header);
        curl_setopt($curl_request, CURLOPT_HEADER, false);
        curl_setopt($curl_request, CURLOPT_URL, $url . '?' . $parameters);
        curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl_request, CURLOPT_SSL_VERIFYPEER, false);
        $json = curl_exec($curl_request);
        curl_close($curl_request);
        //echo '<br>'.$oauth_header.'<br>';
    } while (content_error($json, $parameters));
    return $json;
}
function getdata($url, $parameters, $Consumer_Key, $Consumer_Secret, $Access_Token, $Access_Token_Secret)
{
    $signature = getsignature($url, $parameters, $Consumer_Key, $Consumer_Secret, $Access_Token, $Access_Token_Secret);
    $oauth_header = '';
    $oauth_header .= 'oauth_consumer_key="' . $Consumer_Key . '",';
    $oauth_header .= 'oauth_nonce="' . time() . '", ';
    $oauth_header .= 'oauth_signature="' . $signature . '", ';
    $oauth_header .= 'oauth_signature_method="HMAC-SHA1", ';
    $oauth_header .= 'oauth_timestamp="' . time() . '", ';
    $oauth_header .= 'oauth_token="' . $Access_Token . '", ';
    $oauth_header .= 'oauth_version="1.0", ';
    $curl_header = array("Authorization: Oauth {$oauth_header}", 'Expect:');
    $curl_request = curl_init();
    curl_setopt($curl_request, CURLOPT_HTTPHEADER, $curl_header);
    curl_setopt($curl_request, CURLOPT_HEADER, false);
    curl_setopt($curl_request, CURLOPT_URL, $url . '?' . $parameters);
    curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl_request, CURLOPT_SSL_VERIFYPEER, false);
    $json = curl_exec($curl_request);
    curl_close($curl_request);
    return $json;
}
        debug: false,
        appId: '<?php 
echo $appid;
?>
',
        //在share.php里面有储值
        timestamp: '<?php 
echo $GLOBALS["timestamp"];
?>
',
        nonceStr: '<?php 
echo $GLOBALS["noncestr"];
?>
',
        signature: '<?php 
echo getsignature();
?>
',
        jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage']
    });


    var sharesuccessfunc;
    var sharefuncobj;

    var obj = {};
    //邀请人
    obj.inviter = "<?php 
echo $shareid;
?>
";