Phpsdk
A PHP SDK for the ScreenshotOne.com API to take screenshots of any URL
Install / Use
/learn @screenshotone/PhpsdkREADME
phpsdk
An official Screenshot API client for PHP.
It takes minutes to start taking screenshots. Just sign up to get access and secret keys, import the client, and you are ready to go.
The SDK client is synchronized with the latest screenshot API options.
Installation
composer require screenshotone/sdk:^1.0
Usage
Generate a screenshot URL without executing the request. Or download the screenshot. It is up to you:
<?php
// If you don't use Composer in your project, please, read https://getcomposer.org/doc/01-basic-usage.md#autoloading.
// You need the Composer autoloader to use the API SDK.
// ...
use ScreenshotOne\Sdk\Client;
use ScreenshotOne\Sdk\TakeOptions;
$client = new Client('<your access key>', '<your secret key>');
$options = TakeOptions::url("https://example.com")
->fullPage(true)
->delay(2)
->geolocationLatitude(48.857648)
->geolocationLongitude(2.294677)
->geolocationAccuracy(50);
$url = $client->generateTakeUrl($options);
echo $url.PHP_EOL;
// expected output: https://api.screenshotone.com/take?url=https%3A%2F%2Fexample.com...
$image = $client->take($options);
file_put_contents('example.png', $image);
Tests
Run:
$ composer run-script tests
Or:
$ vendor/bin/phpunit
License
screenshotone/phpsdk is released under the MIT license.
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
