PHPackages                             wxm/venomancer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. wxm/venomancer

ActiveLibrary

wxm/venomancer
==============

venomancer for php

v1.0.6(4y ago)218[1 PRs](https://github.com/qq15725/venomancer/pulls)1MITJavaScriptPHP &gt;=7.1.3CI passing

Since Sep 6Pushed 2w ago1 watchersCompare

[ Source](https://github.com/qq15725/venomancer)[ Packagist](https://packagist.org/packages/wxm/venomancer)[ Docs](https://github.com/qq15725/venomancer)[ RSS](/packages/wxm-venomancer/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (6)Versions (19)Used By (1)

 [ ![Node-Version](https://camo.githubusercontent.com/8389b46e64b748c6db441f6ad020167d8b190b8c4c3f1d3ee49497badc0b4eff/68747470733a2f2f696d672e736869656c64732e696f2f6e6f64652f762f76656e6f6d616e636572) ](https://github.com/qq15725/venomancer) [ ![Javascript-Version](https://camo.githubusercontent.com/7ff6d1afff9653dd8da1102972db9889bf06a084a1df9e366ff860dc04cd6cde/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f76656e6f6d616e6365722e737667) ](https://www.npmjs.com/package/venomancer) [ ![Php-Version](https://camo.githubusercontent.com/fd63900726fc8f3ba56476f2b3cfff896256ccbb98198f389b723ea7758738c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f77786d2f76656e6f6d616e6365722e737667) ](https://github.com/qq15725/venomancer) [ ![Documentation](https://camo.githubusercontent.com/5391604d1e8f886512ab4eeeb3922f4d58a8fac27454e641b1b39c65f51c4d6b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d7965732d627269676874677265656e2e737667) ](https://github.com/qq15725/venomancer) [ ![Maintenance](https://camo.githubusercontent.com/5ca62441414bacaa54c6c6e5b68e46c76305947b6bf498c4949fc71c1b4b10dd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d61696e7461696e65642533462d7965732d677265656e2e737667) ](https://github.com/qq15725/venomancer/graphs/commit-activity) [ ![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667) ](https://github.com/qq15725/venomancer/blob/master/LICENSE)

Node.js 下的 API 服务(可单独使用), 加 PHP 套件.

- 基于 puppeteer 的 headless-chrome 能力封装及性能优化
    - 支持 html 渲染生成图片
    - 支持 url 访问生成图片
    - TODO 其他 headless-chrome 能力
- TODO 其他 API

快速开始
----

[](#快速开始)

```
npm install venomancer --save
```

### Node.js 下单独使用

[](#nodejs-下单独使用)

```
# 启动服务
venomancer --port=8888

# 如果不存在 chromium 根据提示下载 chromium 然后编辑配置，没有提示则不用管这部分，然后再次执行启动服务
vim .env
CHROMIUM_EXECUTABLE_PATH=这里填可执行地址
```

#### Node.js 服务下的 RESTful API 列表

[](#nodejs-服务下的-restful-api-列表)

截图

```
# POST
# content = url
http://localhost:8888/screenshot?content=https://baidu.com&scroll=1&fullPage=1
# content = html
http://localhost:8888/screenshot?content=213123&scroll=1&fullPage=1
```

### PHP 套件

[](#php-套件)

```
composer require wxm/venomancer
```

server.php

```
