是否有适用于 PHP 的无头浏览器库?想要内置 JS 引擎的东西.FOSS 首选.
Is there a headless browser library for PHP? Would like something that has a JS engine built into it. FOSS preferred.
PhantomJS - http://phantomjs.org/
PhantomJS 是一个带有 JavaScript API 的无头 WebKit.它对各种 Web 标准提供快速和原生支持:DOM 处理、CSS 选择器、JSON、Canvas 和 SVG.
PhantomJS is a headless WebKit with JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.
您可以将它与 php-PhantomjsRunner 之类的东西结合起来em>(现已弃用) 如果您想要或自己做饭.
You can couple it with something like php-PhantomjsRunner (now deprecated) if you want or bake your own.
当设置好并准备好开始使用 PhantomJS 进行测试时,选择各种测试框架 随时为您服务.
When setup and ready to start testing with PhantomJS, pick out one of the various Testing Frameworks at your disposal.
我最近也看到了这个教程来自 tutsplus应该对任何人都有帮助.
I recently also came across this tutorial from tutsplus should it help anyone.
这篇关于PHP无头浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!