【问题标题】:Onload timeout preventing to use Curl加载超时阻止使用 Curl
【发布时间】:2011-09-29 20:14:48
【问题描述】:

我正在尝试通过 cURL 检索网页的内容(比如说http://www.foo.com/bar.php)。

当我在浏览器中加载网站时,页面加载时会出现动画,页面最终会显示出来。

但是使用 cURL,这是检索到的内容:

<html>
    <head>
        <meta HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www.foo.com/bar.php">
        <script type="text/javascript"> 
            function waitLoad(){
                setTimeout("showWaitingAnimation()", 50);
            }
        </script>
    </head>
    <body onload="waitLoad()">
         Some stuff here
    </body>
</html>

当我尝试对刷新 url 执行 curl 时,它返回的内容完全相同。

有什么建议吗?

干杯,

一个。

【问题讨论】:

标签: curl


【解决方案1】:

安装 HttpFox Firefox 插件或数据包嗅探器并检查请求和响应。然后尝试用 curl 模拟相同的标头和参数。

【讨论】:

    猜你喜欢
    • 2012-12-18
    • 1970-01-01
    • 2011-01-13
    • 2018-08-19
    • 1970-01-01
    • 2021-01-21
    • 2010-12-12
    • 1970-01-01
    • 2023-03-18
    相关资源
    最近更新 更多