Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 即使url有效,curl也保持为空_Php - Fatal编程技术网

Php 即使url有效,curl也保持为空

Php 即使url有效,curl也保持为空,php,Php,我只是被卷曲的东西卡住了。。。 以前在我的代码中它没有给我任何问题,但是在这里,当我进行var_转储时,$EAACCOUNT总是空的。。。尽管如此,我非常确定url请求是正确的,因为它在我的代码的其他部分工作。。。 你们知道我怎么解决这个问题吗 $account= "http://www.ea.com/p/fut/a/" . $machine . "/l/". $ulocal ."/s/p/ut/game/fifa13/user/accountinfo?timestamp=". $tim

我只是被卷曲的东西卡住了。。。 以前在我的代码中它没有给我任何问题,但是在这里,当我进行var_转储时,$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;
你觉得这有什么建议吗?另请参见:CURLOPT_VERBOSE。否则,总是在json编码之前Wireshark.var_转储$EAACCOUNT。。。。你得到了什么