Skip to content

grinderspro/screenshotlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Screenshotlayer

Wrapper class for Screenshotlayer.com

Installation

Clone the repository https://github.com/grinderspro/screenshotlayer.git

Then run composer install

Usage

Получим скриншот сайта google.com и сохраним его локально на диск '/tmp/google.png'

(new Screenshotlayer('your_secret_key'))
    ->options(['viewport' => '1440x900'])
    ->url('https://google.com')
    ->save('/tmp/google.png');

Получим ссылку полную ссылку на скиншот от сервиса Screenshotlayer, которую затем можно применить, например вставив в атрибут src тега img.

$url = (new Screenshotlayer('your_secret_key'))
        ->options(['viewport' => '1440x900'])
        ->url('https://google.com')
        ->stringUrl();
<img src="<?=$url?>" alt="Image title"> 

About

Screenshotlayer service

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages