server side browser

后端 未结 2 1181
忘掉有多难
忘掉有多难 2021-02-08 23:54

I was wondering if it is possible to run a browser (specifically a browser engine) on the server side. I do not just mean to render a page but to keep a browser open for some ti

2条回答
  •  有刺的猬
    2021-02-09 00:32

    PhantomJS does what you are describing. It is basically a headless browser - http://phantomjs.org/

    you can run it server side via any server side language. See some integration modules below for NodeJS and PHP

    NodeJS

    https://npmjs.org/package/node-phantom

    https://github.com/sgentle/phantomjs-node

    PHP

    https://github.com/diggin/php-PhantomjsRunner

提交回复
热议问题