Download the PHP package edcs/grabby without Composer

On this page you can find all versions of the php package edcs/grabby. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package grabby

Grabby

Codeship Status for edcs/grabby Total Downloads Latest Stable Version License Coverage Status SensioLabsInsight

A PhantomJS adapter to generate screengrabs of webpages in PHP.

Installation

It is recommended that you install this library using Composer. Before installing Grabby, add the following to the scripts namespace in your composer.json file:

That takes care of installing the correct PhantomJS binary into your project directory. Next you need to run the following command to add Grabby to your project:

Dependencies

Grabby requires PHP version >=5.4.0 and symfony/process ^3.1. PhantomJS is also required; Grabby will download the correct binary for your system.

Getting Started

The following snippet will run grabby it's most basic form, this will generate a screengrab of Google's home page in a PNG called grabby.png at a resolution of 1920x1080px. The file will be stored in the same directory which the Grabby Factory class is located.

Extra Parameters

You would probably like your screengrab to be stored in a different location and probably generated in a different size. You can pass Grabby some extra parameters to do this. The following example will generate a screengrab of Google's home page in a PNG called screenshot.jpg at a resolution of 150x200px. The file will be stored in /my/storage/dir/, an exception is thrown if this directory doesn't exist.

Grabby also supports creating PDF versions of web pages in different paper sizes. You can use the same config as above to create PDF renderings using a viewport size, or, you can use the following paper size config:

Since Grabby is built on top of PhantomJS, you have all of the Web Page Module configuration options at your disposal. If you required a complex configuration, you can build up an array using the module option as the array key and it's properties as the value. The following example would create a portrait A4 PDF with a 3cm margin containing an image of Google's homepage viewied through a 150px by 200px viewport using a header called X-Test with the value foo:

You can check out the Web Page Module documentation here: http://phantomjs.org/api/webpage/

Other File Formats

You can generate screengrabs in png, jpg or pdf formats. Simply suffix the filename property with one of those extensions.

Accessing the Generated File

Once you have run grab() to generate your screengrab file, you can either access the generated filenames path like so:

Or you access the contents of the file like so:

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover a security vulnerability within this package, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.


All versions of grabby with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
symfony/process Version ^3.0
jakoch/phantomjs-installer Version 2.1.1-p04
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package edcs/grabby contains the following files

Loading the files please wait ....