我正在尝试使用https://github.com/aaronpk/Google-Voice-PHP-API处的curl和google语音课程登录google语音,以发送短信。
我收到以下错误:“您的浏览器的Cookie功能已关闭。请打开它。 [?]”
登录期间问题的根源在以下代码中:
curl_setopt($this->_ch, CURLOPT_URL, 'https://www.google.com/accounts/ServiceLoginAuth?service=grandcentral');
curl_setopt($this->_ch, CURLOPT_POST, TRUE);
curl_setopt($this->_ch, CURLOPT_COOKIEFILE, $this->_cookieFile);
curl_setopt($this->_ch, CURLOPT_POSTFIELDS, array(
'Email' => $this->_login,
'Passwd' => $this->_pass,
'continue' => 'https://www.google.com/voice/account/signin',
'service' => 'grandcentral',
'GALX' => $GALX
));
$html = curl_exec($this->_ch);
有人可以告诉我该做什么吗?
提前致谢,
KC
答案 0 :(得分:0)
我也有同样的问题。你在启用cookie的情况下执行Get请求。在POST时也使用该cookie.it工作正常。