Data extraction from a website with ajax

Hi, i need to make a web aplication that is able to get the contents from a webpage, the problem is almost the entire website is in ajax and i need to get an specific data and the only way to access there is inserting a javascript command.

The traditional way is to copy the webpage contents but i need to copy them after the ajax loads the info i’m looking for.

Please Help me!

I’m using javascript, php and curl is possible to make something to get that info?

the website where i’m trying to make this work is www.betfair.com

Okay well, I have to admit I’m just throwing thoughts at you. None of these are anything I’ve tried.

(btw don’t multipost :X)

I seem to recall when talking about the ajax class XMLHttpRequest, that it could fetch content that itself is made by ajax? And you can provide u/p and such if needed too.

Also, not sure if this is something that will work cross servers, but I know jQuery has a lot of Ajax support… something like this maybe;


$.ajax({
  type: "POST",
  url: "http://www.yada.com/page.php/ajaxMethod",
  data: "{}",
  contentType: "application/json; charset=utf-8",
  dataType: "json",
  success: function(msg) {
    // Do something interesting here.
  }
});

Other than that, no clue.

Using that code i can apply a javascript function to open the content i need and then use the innerHtmlfrom the div I need?