PHPackages                             ksenzee/browserstack-screenshots-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ksenzee/browserstack-screenshots-php

ActiveLibrary[API Development](/categories/api)

ksenzee/browserstack-screenshots-php
====================================

A PHP client for the Browserstack Screenshots API

49.6k11PHP

Since Aug 22Pushed 11y agoCompare

[ Source](https://github.com/ksenzee/browserstack-screenshots-php)[ Packagist](https://packagist.org/packages/ksenzee/browserstack-screenshots-php)[ RSS](/packages/ksenzee-browserstack-screenshots-php/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (1)

Installation
------------

[](#installation)

1. Get Composer: Download the [`composer.phar`](https://getcomposer.org/composer.phar) executable or use the installer.

    ```
    $ curl -sS https://getcomposer.org/installer | php
    ```

    If you already have Composer installed globally, skip this step.
2. Create a composer.json file specifying BrowserstackScreenshots as a dependency. You can have Composer do this for you by using this command:

    ```
    $ php composer.phar require ksenzee/browserstack-screenshots-php:*
    ```

    Or, if you already have Composer installed:

    ```
    $ composer require ksenzee/browserstack-screenshots-php:*
    ```

    Or if you'd rather, you can create your composer.json file by hand:

    ```
    {
        "require": {
            "ksenzee/browserstack-screenshots-php": "*"
        }
    }
    ```
3. Use Composer to install BrowserstackScreenshots (and anything else you listed in your composer.json file):

    ```
    $ php composer.phar install
    ```

    Or, if you have Composer installed globally:

    ```
    $ composer install
    ```

Instantiating the client
------------------------

[](#instantiating-the-client)

```
require_once 'vendor/autoload.php';

$credentials = array(
    'username' => 'janedoe',
    'password' => 'abc123',
);
$client = new \BrowserstackScreenshots\ScreenshotsClient($credentials);
```

Requesting a set of screenshots
-------------------------------

[](#requesting-a-set-of-screenshots)

```
// The JobConfig class is designed to help you generate JSON that meets the
// criteria at http://www.browserstack.com/screenshots/api#generate-screenshots.
$config = new \BrowserstackScreenshots\JobConfig();
$config->setUrl('http://www.google.com');
$config->setWaitTime(5);
$config->setQuality('original');
$config->addBrowser(array('os' => 'Windows', 'os_version' => '7', 'browser' => 'ie', 'browser_version' => '11.0'));
$config->addBrowser(array('os' => 'ios', 'os_version' => '6.0', 'device' => 'iPhone 4S (6.0)'));

// You can use it to generate the JSON to describe your job:
$json = $config->getJson();

// ... or you can skip the JobConfig class entirely and write your own JSON:
$json = '{"url":"https:\/\/www.google.com","wait_time":5,"quality":"original","browsers":[{"os":"Windows","os_version":"7","browser":"ie","browser_version":"11.0"},{"os":"ios","os_version":"6.0","device":"iPhone 4S (6.0)"}]}';

// Once you have valid JSON describing a URL and a set of browsers, use it to
// send a POST request to start a screenshot job:
print "Requesting screenshots:\n";
$request_info = $client->generateScreenshots($json);
$job_id = $request_info['job_id'];
```

Checking on job status
----------------------

[](#checking-on-job-status)

```
// See whether the job is finished:
$finished = $client->jobFinished($job_id);

// Get more details on the job status (whether it's done, queued, or timed out):
$job_status = $client->getStatus($job_id);

// Or just retrieve all available information about your job:
$job_info = $client->getJobInfo($job_id);
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d34c5d2a3647e54f2a1556cea53fbf7d718489e5d2df201afedbf847f9678da3?d=identicon)[ksenzee](/maintainers/ksenzee)

---

Top Contributors

[![ksenzee](https://avatars.githubusercontent.com/u/139256?v=4)](https://github.com/ksenzee "ksenzee (1 commits)")

### Embed Badge

![Health badge](/badges/ksenzee-browserstack-screenshots-php/health.svg)

```
[![Health](https://phpackages.com/badges/ksenzee-browserstack-screenshots-php/health.svg)](https://phpackages.com/packages/ksenzee-browserstack-screenshots-php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
