开发者

php cURL how to process all the request on the page

when I make a GET request with curl to a remote web server I own in the access log I only see one request (the initial one) if I visit with a real browser I get the initial request plus all the other GET requests like css, images, js etc..

Is there a way for cURL to actually act like a browser and process all the page? Isn't it supposed to do this? Otherwise what is the response outpu开发者_如何转开发t, the html code only?


Most command line browsers would ignore the additional requests as well...

cURL does not render any markup and has no need for the other data. What good are images and styling definitions in a text only view?

You can simulate these requests by parsing the markup returned by the initial request and following on with the other requests as a browser would.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜