wnx/screeenly-client
最新稳定版本:v2.0.2
Composer 安装命令:
composer require wnx/screeenly-client
包简介
PHP API Wrapper for screeenly.com
README 文档
README
PHP Wrapper for the Screeenly API. You must have a Screeenly account to use this package.
Important notice: This package has been abandoned! I want to focus on more useful projects and the screeenly API is already very easy to use.
Installation
Install the package with composer:
Guzzle v6:
$ composer require "wnx/screeenly-client:~2.0"
Guzzle v5:
$ composer require "wnx/screeenly-client:~1.0"
For Laravel 4 prjoects:
$ composer require "wnx/screeenly-client:~0.3"
Usage
Laravel 5
Read more for Laravel 4 usage.
Add the following code to your providers array in app/conifg/app.php:
... 'Wnx\ScreeenlyClient\ScreeenlyClientServiceProvider',
Publish the configration file and add your Screeenly API Key in config/screeenly_client.php.
php artisan vendor:publish --provider="Wnx\ScreeenlyClient\ScreeenlyClientServiceProvider"
Now you have access to the Screenshot Facade. Use it like the example below:
$path = public_path('/'); $screenshot = Screenshot::capture('http://google.com'); $localPath = $screenshot->store($path, 'screenshot.jpg');
Non-Laravel Usage
use Wnx\ScreeenlyClient\Screenshot; ... $screenshot = new Screenshot($key); $screenshot->capture('http://google.com'); $localPath = $screenshot->store('path/to/image/store/', 'screenshot.jpg');
Available Methods
$screeenshot->capture($url);
Create Screenshot of given URL.
$screeenshot->store($path, $filename);
Store screenshot on local disk. Returns path to image.
$screeenshot->setHeight(integer);
Optional. Set screenshot height.
$screeenshot->setWidth(integer);
Optional. Set screenshot width.
$screeenshot->getPath();
Return path to temporary image on Screeenly server.
$screeenshot->getBase64();
Return base64-string for screenshot.
License
MIT
wnx/screeenly-client 适用场景与选型建议
wnx/screeenly-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 31.93k 次下载、GitHub Stars 达 21, 最近一次更新时间为 2015 年 01 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「laravel」 「screenshot」 「screeenly」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 wnx/screeenly-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wnx/screeenly-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 wnx/screeenly-client 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Instrument headless chrome/chromium instances from php5.6
A PSR-7 compatible library for making CRUD API endpoints
The official SDK for Capture.
Alfabank REST API integration
Finds individual items inside an image and gets their size/coordinates.
It has a function to supplement php-webdriver
统计信息
- 总下载量: 31.93k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 23
- 点击次数: 18
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-13