我正在用 php 编写一个小程序,利用 curl 登录并从服务下载一些报告。该程序可以正常工作,直到它应该获取报告的这一点,然后程序一直超时并显示以下消息。有什么想法或建议吗?我最初连接的服务器是一个 MS IIS 服务器,然后它跳转到这个 AkamaiGHost 服务器以获取报告。
以下是我正在使用的 curl setopts
curl_setopt($ch, CURLOPT_USERAGENT,$user_agent);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch,CURLOPT_COOKIEJAR,$cookie_file);
curl_setopt($ch,CURLOPT_COOKIEFILE,$cookie_file);
curl_setopt($ch,CURLOPT_CERTINFO,true);
curl_setopt($ch,CURLOPT_HEADER,true);
curl_setopt($ch,CURLOPT_HTTPAUTH,CURLAUTH_ANY);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,true);
curl_setopt ($ch, CURLOPT_CAINFO,'cacert.pem');
Report Response:
HTTP/1.1 100 Continue
HTTP/1.1 504 Gateway Time-out
Server: AkamaiGHost
Mime-Version: 1.0
Content-Type: text/html
Content-Length: 250
Expires: Fri, 05 Jul 2013 19:14:43 GMT
Date: Fri, 05 Jul 2013 19:14:43 GMT
Connection: close
<HTML><HEAD>
<TITLE>Gateway Timeout - In read </TITLE>
</HEAD><BODY>
<H1>Gateway Timeout</H1>
The proxy server did not receive a timely response from the upstream server.<P>
Reference #1.ed690317.1373051683.bb2c2f0
</BODY></HTML>