A PHP SDK for the ScreenshotOne.com API to take screenshots of any URL

Related tags

API phpsdk
Overview

phpsdk

Build

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 

// ...

use ScreenshotOne\Sdk\Client;
use ScreenshotOne\Sdk\TakeOptions;

$client = new Client('M73PaLOC8lchKQ', 'VjuscNqAfGCC4A');

$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.

You might also like...
BT Open API SDK in PHP

Mosel, a sdk package for BT open APIs This package is still under construction (july 13th 2022). Open Api are described in the Bouygues Telecom Develo

An SDK built to facilitate application development for Facebook Ads API.

Facebook Business SDK for PHP Introduction The Facebook Business SDK is a one-stop shop to help our partners better serve their businesses. Partners a

ExchangeRatesAPI - Currency Exchange Rates API SDK

ExchangeRatesAPI - Currency Exchange Rates API SDK This is an unofficial wrapper for the awesome, free ExchangeRatesAPI, which provides exchange rate

This PHP library will help you to work with your Pinterest account without using any API account credentials.
This PHP library will help you to work with your Pinterest account without using any API account credentials.

Pinterest Bot for PHP A PHP library to help you work with your Pinterest account without API credentials. The Pinterest API is painful: receiving an a

PHP REST API without using any frameworks. Contains all CRUD operations.
PHP REST API without using any frameworks. Contains all CRUD operations.

PHP REST API without any framework and CRUD operations 🖐 Hi there, this is a simple REST API built in PHP without using any frameworks. This is built

Facebook SDK for PHP (v6) - allows you to access the Facebook Platform from your PHP app

Facebook SDK for PHP (v6) This repository contains the open source PHP SDK that allows you to access the Facebook Platform from your PHP app. Installa

Unofficial Firebase Admin SDK for PHP

Firebase Admin PHP SDK Table of Contents Overview Installation Documentation Support License Overview Firebase provides the tools and infrastructure y

Notion PHP SDK
Notion PHP SDK

Notion PHP SDK This is an unofficial PHP SDK for the new public Notion API. It's work in progress as we didn't get the change to be included to the pr

爱发电非官方简易 PHP SDK

afdian-php-sdk 爱发电非官方简易 PHP SDK by Akkariin 这是一个简单的 SDK,可以用于查询爱发电的订单和赞助者信息 Installation 将项目 clone 到本地即可 git clone https://github.com/ZeroDream-CN/afdi

Comments
  • TakeOptions should support hide_selectors customization

    TakeOptions should support hide_selectors customization

    The documentation mentions a hide_selectors customization option, but this is not supported by the PHP SDK.

    Customization

    hide_selectors

    The hide_selectors option allows hiding elements before taking a screenshot. You can specify as many selectors as you wish. All elements that match each selector will be hidden by setting the display style property to none !important.

    An example of the request URL with hide_selectors=.a&hide_selectors=.b:

    opened by kjohnson 1
  • TakeOptions now supports hide_selectors customization

    TakeOptions now supports hide_selectors customization

    Description

    This PR adds support for the hide_selectors customization by adding the hideSelectors() method to the TakeOptions class.

    Usage Example

    $options = TakeOptions::url($url)
        ->hideSelectors('.woocommerce-store-notice')
    ;
    
    opened by kjohnson 0
Owner
ScreenshotOne.com
Fast and reliable screenshot API built to handle millions of screenshots a month. Get started for free.
ScreenshotOne.com
Shopware PHP SDK is a simple SDK implementation of Shopware 6 APIs

Shopware PHP SDK is a simple SDK implementation of Shopware 6 APIs. It helps to access the API in an object-oriented way.

Thuong Le 77 Dec 19, 2022
Syntax to query GraphQL through URL params, which grants a GraphQL API the capability to be cached on the server.

Field Query Syntax to query GraphQL through URL params, which grants a GraphQL API the capability to be cached on the server. Install Via Composer com

PoP 4 Jan 7, 2022
The 1Password Connect PHP SDK provides your PHP applications access to the 1Password Connect API hosted on your infrastructure and leverage the power of 1Password Secrets Automation

1Password Connect PHP SDK The 1Password Connect PHP SDK provides your PHP applications access to the 1Password Connect API hosted on your infrastructu

Michelangelo van Dam 12 Dec 26, 2022
SDK of the LINE Login API for PHP

LINE Login for PHP SDK of the LINE Login API for PHP Documentation See the official API documentation for more information. Installation Use the packa

null 4 Sep 15, 2022
Esse SDK em PHP foi desenvolvido no intuito de tornar mais prático a integração com nossa API.

Sobre Beedoo SDK Acessar documentação completa da Beedoo API. A API é organizada seguindo a arquitetura REST, boas práticas, convenções e padrões como

Beedoo Edtech 5 Dec 2, 2021
A PHP SDK for accessing the OpenAI GPT-3 API

OpenAI GPT-3 Api Client in PHP Installation You can install the package via composer: composer require orhanerday/open-ai Usage use Orhanerday\OpenAi\

Orhan erday 462 Jan 2, 2023
The Facebook SDK for PHP provides a native interface to the Graph API and Facebook Login

Facebook SDK for PHP (v5) This repository contains the open source PHP SDK that allows you to access the Facebook Platform from your PHP app. Installa

Meta Archive 3.1k Dec 30, 2022
PHP SDK for the Sellix Developers API (developers.sellix.io)

PHP SDK for the Sellix Developers API (developers.sellix.io). Quickly get started and create products, payments and more using PHP.

Sellix 7 Nov 23, 2022
Mark Sign - Gateway API PHP SDK

Mark Sign - Gateway API PHP SDK

Mark Sign 3 Feb 22, 2022
Light PHP SDK to interact with the Doma(in)Validity API.

Doma(in)Validity PHP SDK. Light PHP SDK to interact with the Doma(in)Validity API. Usage <?php require_once 'vendor/autoload.php'; use Domainvalidit

Doma(In)Validity 2 May 3, 2022