Raphael Caixeta
Raphael Caixeta

Reputation: 7846

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 connect 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?

Upvotes: 0

Views: 2549

Answers (3)

Russell Leggett
Russell Leggett

Reputation: 8883

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.

Upvotes: 0

St. John Johnson
St. John Johnson

Reputation: 6660

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.

Upvotes: 2

BojanG
BojanG

Reputation: 1922

Try Fiddler FiddlerTool

Upvotes: 1

Related Questions