PHP Headless Browser?(PHP无头浏览器?)
问题描述
是否有适用于 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无头浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:PHP无头浏览器?


- 从 PHP 中的输入表单获取日期 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- Laravel 仓库 2022-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01