Non-browser emulation of JavaScript - is it possible?

前端 未结 8 2281
眼角桃花
眼角桃花 2020-12-17 21:13

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 resul

8条回答
  •  借酒劲吻你
    2020-12-17 22:06

    All these answers seem to presume that there is no possibility of php JavaScript emulation, but there is a near-fully-compliant open-source php JavaScript emulator here:

    http://www.sitepoint.com/blogs/2006/01/19/j4p5-javascript-for-php5/

    Combined with Env.js, you could get pretty close to a full server-side js execution solution.

提交回复
热议问题