开发者

Onload timeout preventing to use Curl

I am trying to retrieve the content of a web page via cURL (let's say http://www.foo.com/bar.php).

When I load the website in the browser, an animation appears while the page is loading, and the page eventually shows up.

But with cURL, here is what is retrieved :

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

And when I try to perform a curl to the refresh url, it returns exactly the same thing.

Any suggestion ?

Cheers,

A.


Install the HttpFox Firefox Addon or a packet sniffer and inspect the requests and responses. Then try to emulate the same headers and parameters with curl.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜