wueason / icapture
A PHP Class to interact with PhantomJs and capture screenshot of a webpage
v1.0.0
2017-04-08 14:18 UTC
Requires
- chrisboulton/php-resque: 1.2.x
- microweber/screen: 1.0.x
This package is not auto-updated.
Last update: 2025-03-07 21:47:54 UTC
README
PhantomJS as a service with Swoole module. Icapture can be a service for your screenshop purpose.
Requirements
- PHP 5.3+
- Redis 2.2+ and make sure the redis is up
- Swoole extension 1.8.13+
- Optional but Recommended: Composer
Getting Started
If you're not familiar with Composer, please see http://getcomposer.org/.
- Add icapture to your application's composer.json.
{ "require": { "wueason/icapture": "1.0.x" } }
-
Run
composer install
. -
If you haven't already, add the Composer autoload to your project's initialization file. (example)
require 'vendor/autoload.php';
- Service management.
make start
make stop
make restart
- Composer a request with
\Icapture\CaptureClient
, and get the capture.
$client = new \Icapture\CaptureClient(); $client->request(); echo $clien->getCaptureFile();
Tips
PhantomJS binary file in Screen may be broken, you can use your own
with phantomjsBinPath
setting instead.