PHP SDK

Bring Snapshot Site into Laravel, Symfony, WordPress, and PHP backends

Use the official PHP SDK when your product already runs on PHP and you want screenshot, analyze, and compare workflows to feel native inside your backend codebase.

snapshot-site/php-sdk
Official package
PHP
Framework and backend friendly
Download helper
Save returned assets locally
Install:composer require snapshot-site/php-sdk
Auth:SNAPSHOT_SITE_API_KEY=ss_live_xxx
PHP workflow
Good fits
Laravel and Symfony applications that need browser-based capture workflows
WordPress and PHP services that need screenshot, analyze, and compare
Backend teams that want a simpler client than raw cURL requests
Projects that need to download returned assets locally

SDK overview

The PHP SDK gives backend teams a direct integration path into Snapshot Site without building custom request wrappers for each endpoint.

1

Built for existing PHP stacks

Use it inside Laravel, Symfony, WordPress, or custom PHP services.

2

One client for core workflows

Screenshot, analyze, and compare are available through the same SDK surface.

3

Works well in backend jobs

Use it in queues, backend services, export jobs, and internal tools.

4

Asset download helper included

Save returned assets locally without writing your own download logic.

Quick start

Install, authenticate, call the SDK

1

Install `snapshot-site/php-sdk` with Composer

2

Provide your Snapshot Site API key

3

Instantiate the client

4

Call screenshot, analyze, compare, or download helpers

Code examples

Screenshot

Minimal screenshot example

Capture a page from a PHP backend with a direct client.

<?php

require __DIR__ . '/vendor/autoload.php';

use SnapshotSite\Client;

$client = new Client('ss_live_xxx');

$result = $client->screenshot([
    'url' => 'https://snapshot-site.com/pricing',
    'width' => 1440,
    'format' => 'png',
    'fullSize' => true,
    'hideCookie' => true,
]);

echo $result['link'] ?? '';
Analyze

Analyze example

Run page analysis from the same PHP client.

$result = $client->analyze([
    'url' => 'https://snapshot-site.com',
    'width' => 1440,
    'fullSize' => true,
    'enableSummary' => true,
    'enableQuality' => true,
]);

print_r($result);
Compare

Compare and save assets

Compare two states and download the returned asset locally.

$result = $client->compare([
    'before' => [
        'url' => 'https://snapshot-site.com/pricing',
        'width' => 1440,
        'fullSize' => true,
        'hideCookie' => true,
    ],
    'after' => [
        'url' => 'https://staging.snapshot-site.com/pricing',
        'width' => 1440,
        'fullSize' => true,
        'hideCookie' => true,
    ],
    'threshold' => 0.1,
]);

$client->downloadTo($result, __DIR__ . '/pricing.png');