Esempio n. 1
0
function test_queryAppIoscert()
{
    global $apiKey;
    global $secretKey;
    $channel = new Channel($apiKey, $secretKey);
    //如果ios应用当前部署状态为开发状态,指定DEPLOY_STATUS为1,默认是生产状态,值为2.
    //旧版本曾采用不同的域名区分部署状态,仍然支持。
    //$optional[Channel::DEPLOY_STATUS] = 1;
    $ret = $channel->queryAppIoscert();
    if (false === $ret) {
        error_output('WRONG, ' . __FUNCTION__ . ' ERROR!!!!');
        error_output('ERROR NUMBER: ' . $channel->errno());
        error_output('ERROR MESSAGE: ' . $channel->errmsg());
        error_output('REQUEST ID: ' . $channel->getRequestId());
    } else {
        right_output('SUCC, ' . __FUNCTION__ . ' OK!!!!!');
        right_output('result: ' . print_r($ret, true));
    }
}
Esempio n. 2
0
function test_queryAppIoscert()
{
    global $apiKey;
    global $secretKey;
    $channel = new Channel($apiKey, $secretKey);
    //注意百度push服务对ios dev版与ios release版采用不同的域名.
    //如果是dev版请修改push服务器域名"https://channel.iospush.api.duapp.com", release版则使用默认域名,修改域名使用setHost接口
    //$channel->setHost("https://channel.iospush.api.duapp.com");
    $ret = $channel->queryAppIoscert();
    if (false === $ret) {
        error_output('WRONG, ' . __FUNCTION__ . ' ERROR!!!!');
        error_output('ERROR NUMBER: ' . $channel->errno());
        error_output('ERROR MESSAGE: ' . $channel->errmsg());
        error_output('REQUEST ID: ' . $channel->getRequestId());
    } else {
        right_output('SUCC, ' . __FUNCTION__ . ' OK!!!!!');
        right_output('result: ' . print_r($ret, true));
    }
}