javascript - Data mining from HTML on PHP server -
i have created nice library using jquery, runs in browser , fulfills task of mining arbitrary data various html pages. migrate library apache server running php , run server-side. however, not know reliable browser emulators compatible php. worst case scenario implement whole thing again in php. solution involve:
- sending requests
- parsing html
- implementing basic functionalities task performed javascript/jquery standards before
- implement library scratch php
however, part of worst case scenario. other part pages perform further actions on client-side , send requests server. means there cases when initial page load not contain parts of data.
in case ideal have server-side browser emulator, load pages , accept javascript commands , give responses. there technologies in area, or should think implementing scratch?
you should try phantomjs (http://phantomjs.org), webkit engine "in console" can installed on server. caperjs (http://casperjs.org/) may useful.
Comments
Post a Comment