This might seem a bit backwards, but I want to use Perl (and Curl if possible) to get data from a site that is using Ajax to fill an HTML shell with information. How do I make these Javascript calls to get the data I need?
The website is here: http://www.jigsaw.com/showContactUpdateTab.xhtml?companyId=224230
Remember that AJAX calls are ordinary HTTP requests, so you always should be able to perform them.
Open Firebug or Web Inspector on the website you’re talking about, you’ll see some XHR calls:
Yay! Now you know where to get that data. Their scripts use
POSTHTTP request to the URLs above, so if you open them in your browser, you’ll see various engine errors.When you sniff (via Web Inspector debugger, for example) their AJAX POST requests, you’ll see the next body:
I’m pretty sure, they’re generating a bunch of security session IDs to avoid data miners. You may need to dive into their JavaScript codes to learn more about those generators.