title: Non-browser emulation of JavaScript - is it possible?
body: <p>I have a new project I am working on that involves fetching a webpage, (using PHP and cURL) parsing the HTML and javascript out of it and then handling the data in the results. </p>
  
  <p>Basically I hit a brick wall when the site uses javascript to fetch its data by AJAX. In this case, the initial data will not appear in the fetched page unless the javascript is run in a browser. </p>
  
  <p>Are there any PHP libraries for this? (I suspect not, but I could be wrong.)</p>
  
  <p>I would really rather build this as a server-based solution, otherwise I am forced to have to build an application for this and using mozilla and/or IE runtime libraries - which kind of defeats the purpose.</p>