2017 © Pedro Peláez
 

library webthumb

image

simexis/webthumb

  • Thursday, May 21, 2015
  • by jooorooo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Webthumb

This is a library for PHP to take a screen shot using PhantomJS., (*1)

It is easy specification of only have Exec the phantomjs command in the middle., (*2)

Webthumb Class for Laravel 5.3, (*3)

Requirements

  • Laravel 5.3
  • php 5.6+

Installation

Step 1: Install package using Composer
composer require simexis/webthumb

Step 2: Laravel 5.5+

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php, (*4)

Simexis\Webthumb\WebthumbServiceProvider::class,

Usage

Default configuration is:, (*5)

$cfg = [
    'local_cache_dir'   =>  public_path() . "/thumbs", //relative cache directory must exists in install directory and rwx permissions to all (777)
    'phantom_js_root'   => __DIR__ . '/../lib/phantomjs', //Path to the root directory phantom_js

    'encoding'          =>      "png", // jpg or png
    'bwidth'            =>      "1280", // browser width
    'bheight'           =>      "1024" // browser height only for mode=screen
];

Basic example

echo \Webthumb::setUrl('http://google.com')->save($save_path);
echo (new \Webthumb)
        ->setURL('http://google.com')
        ->setScreenWidth('1024')
        ->setScreenHeight('768')
        ->save($save_path);

The Versions

21/05 2015

dev-master

9999999-dev

  Sources   Download

The Requires

  • php >=5.4.0

 

21/05 2015

1.0

1.0.0.0

  Sources   Download

The Requires

  • php >=5.4.0