public function requestURL()
{
$ch = curl_init($this->url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, array('Host: consumeprod.alipay.com', 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0', 'Accept: */*', 'Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3', 'Accept-Encoding: gzip, deflate', 'DNT: 1', 'Referer: https://authgtj.alipay.com/login/index.htm', 'Connection: keep-alive'));
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_COOKIE, $this->cookie);
$response = curl_exec($ch);
if (curl_errno($ch)) {
$response = curl_error($ch);
}
/*
list($header, $body) = explode("\r\n\r\n", $response);
preg_match_all("/Set-Cookie:(.*)/i", $header, $matches);
$cookie = '';
foreach ($matches as $kk => $vv) {
$cookie .= $vv[1];
}
$conf = Option::get('alipay_conf');
if ($conf != $cookie) {
Option::set('alipay_conf', $cookie);
}
*/
curl_close($ch);
return $response;
}