title: Data mining from HTML on PHP server
body: <p>I have created a nice library using jQuery, which runs in the browser and basically fulfills the task of mining arbitrary data from various html pages. I would like to migrate this library to an Apache server running PHP and run it server-side. However, I do not know about reliable browser emulators compatible with PHP. The worst case scenario is to implement the whole thing again in PHP. This solution would involve:</p>
  
  <ul>
  <li>sending requests</li>
  <li>parsing HTML</li>
  <li>implementing basic functionalities to do the task performed by Javascript/jQuery standards before</li>
  <li>implement the library from scratch for PHP</li>
  </ul>
  
  <p>However, this is only part of the worst case scenario. The other part is that some pages perform further actions on client-side and then send requests to the server. This means that there are some cases when the initial page load does not contain parts of the data.</p>
  
  <p>In my case it would be ideal to have a server-side browser emulator, which could load the pages and accept javascript commands and give back the responses. Are there some technologies in this area, or should I think about implementing everything from scratch?</p>