开发者

Monitor AJAX calls via cURL

Is it possible to monitor a page's AJAX calls via cURL in PHP? For example, if I connect to a website that uses lots of AJAX to pull content, can I connec开发者_StackOverflow中文版t to the site via cURL, have it wait a couple of seconds until the AJAX requests are done and analyze the request that the site made?


Basically, no. cURL is not a replacement for a browser. It simply downloads the HTML file. The browsers will take that HTML, read for external scripts (js/css/images), download them, and then finally execute the JavaScript according to the browser's specific engine.


Try Fiddler FiddlerTool


Firebug lets you easily monitor Ajax calls from the browser. All XMLHttpRequests show up in the Console and Net tabs with the ability to see both the request and response.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜