Php 即使url有效,curl也保持为空
我只是被卷曲的东西卡住了。。。 以前在我的代码中它没有给我任何问题,但是在这里,当我进行var_转储时,$EAACCOUNT总是空的。。。尽管如此,我非常确定url请求是正确的,因为它在我的代码的其他部分工作。。。 你们知道我怎么解决这个问题吗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
$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。。。。你得到了什么