1

我只是被卷曲的东西困住了......它在我的代码中没有给我任何问题,但是在这里,当我执行 var_dump 时,$EAACCOUNT 总是为空......不过,我很确定 url 请求是正确的,因为它适用于我编码的其他部分......你们知道我该如何解决这个问题吗?

    $account= "http://www.ea.com/p/fut/a/" . $machine . "/l/". $ulocal ."/s/p/ut/game/fifa13/user/accountinfo?timestamp=". $time;
    $auth   = "http://www.ea.com/p/fut/a/" . $machine . "/l/". $ulocal ."/s/p/ut/auth";
    $quest  = "http://www.ea.com/p/fut/a/" . $machine . "/l/". $ulocal ."/s/p/ut/game/fifa13/phishing/validate";


    //Cookie Data includes the two keys from above
    $cookie_string = $EASW_KEY."; ".$EASF_SESS;
    //Setup cURL HTTP request
    $ch = curl_init($account);                                                                                                                                      
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_COOKIE, $cookie_string);                                                                      
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
        'Content-Type: application/x-www-form-urlencoded')                                                                   
    );                                                                                                                   

    $EAACCOUNT = curl_exec($ch);
    curl_close($ch);

    //Get personaID and Platform
    $d = json_decode($EAACCOUNT, true);
$personaID = $d->userAccountInfo->personas[0]->personaId;
    $platform  = $d->userAccountInfo->personas[0]->userClubList[0]->platform;
4

0 回答 0