2017 © Pedro Peláez
 

library pagepeekr

A packaged client for the pagepeeker.com service

image

vanqard/pagepeekr

A packaged client for the pagepeeker.com service

  • Friday, January 22, 2016
  • by vanqard
  • Repository
  • 1 Watchers
  • 0 Stars
  • 166 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

vanqard/pagepeekr

This is a small client package wrapped around GuzzleHttp in order to simplify retrieving thumbnails of web pages as JPEGS via the PagePeeker.com service, (*1)

Installation

Recommended installation is via composer, (*2)

php composer.phar require vanqard/pagepeekr

Usage

After the package has been installed, usage is reasonable simple., (*3)

First, build up an array of parameters like this. (Note that only the sourceUrl parameter is required), (*4)

$params = [
    'sourceUrl' => 'https://phpbrilliance.com',
    // Optional parameters
    'targetFileName' => '/public/images/phpbrilliance_thumbnail.jpg',
    'thumbnailSize' => 't|s|m|l|x',
    'pollInterval' => 5 // I don't recommend changing the default
];

Then instantiate the client with the parameter array, (*5)

$client = new \Vanqard\PagePeekr\Client($params);

And request the thumbnail from PagePeeker.com like so, (*6)

$filename = $client->fetchThumbNail();

The $filename variable is populated with the path to the downloaded thumbnail., (*7)

Still to do

  • Unit tests
  • Added flexibility

Warning

This code is far from being production ready. Please do feel free to experiment with it., (*8)

Security

If you find any security issues with this package, please contact the author directly here: thunder@vanqard.com, (*9)

The Versions

22/01 2016

dev-master

9999999-dev

A packaged client for the pagepeeker.com service

  Sources   Download

MIT

The Requires

 

22/01 2016

0.0.2

0.0.2.0

A packaged client for the pagepeeker.com service

  Sources   Download

MIT

The Requires

 

22/01 2016

0.0.1

0.0.1.0

A packaged client for the pagepeeker.com service

  Sources   Download

MIT

The Requires