Websnap PHP Client

1.3.0 2021-05-26 19:05 UTC

This package is auto-updated.

Last update: 2021-05-26 19:10:34 UTC


Install with composer: composer require websnap/php

Getting started

  1. Register for free at https://www.websnap.app
  2. Create a project and copy it's token


You can either pass an url to the client's screenshot method or pass a string containing html.

$client = new \Websnap\Php\Client('YOUR_TOKEN');

// Take screenshot of an url
$response = $client->screenshot('https://www.websnap.app');

// Take screenshot of passed html
$response = $client->screenshot('<h1>Hello world!</h1>');

Please see the documentation for further options.