我正在使用php编写一个小型程序,利用curl登录并从服务中下载一些报告。在程序获取报告时遇到问题,出现了下面的超时消息。你有什么想法或建议吗?我最开始连接的服务器是MS IIS服务器,然后跳转到AkamaiGHost服务器进行报告下载。
以下是我使用的curl setopts:
以下是我使用的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>