PHPackages                             techulus/capture - 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. techulus/capture

ActiveLibrary[API Development](/categories/api)

techulus/capture
================

Official PHP SDK for Capture (capture.page). Capture screenshots, generate PDFs, extract content and metadata from web pages.

00CI passing

Since Apr 5Pushed 1mo agoCompare

[ Source](https://github.com/techulus/capture-php)[ Packagist](https://packagist.org/packages/techulus/capture)[ RSS](/packages/techulus-capture/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Capture PHP SDK
===============

[](#capture-php-sdk)

Official PHP SDK for [Capture](https://capture.page) - Screenshot and content extraction API.

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

[](#installation)

```
composer require techulus/capture
```

Quick Start
-----------

[](#quick-start)

```
use Techulus\Capture\Capture;

$client = new Capture('your-api-key', 'your-api-secret');

$imageUrl = $client->buildImageUrl('https://example.com');
echo $imageUrl;
```

Features
--------

[](#features)

- **Screenshot Capture**: Capture full-page or viewport screenshots as PNG/JPG
- **PDF Generation**: Convert web pages to PDF documents
- **Content Extraction**: Extract HTML and text content from web pages
- **Metadata Extraction**: Get page metadata (title, description, og tags, etc.)
- **Animated GIFs**: Create animated GIFs of page interactions
- **Zero Dependencies**: Uses only PHP built-in extensions (curl, json)

Usage
-----

[](#usage)

### Initialize the Client

[](#initialize-the-client)

```
use Techulus\Capture\Capture;

$client = new Capture('your-api-key', 'your-api-secret');

// Use edge endpoint for faster response times
$client = new Capture('your-api-key', 'your-api-secret', ['useEdge' => true]);
```

### Building URLs

[](#building-urls)

#### Image Capture

[](#image-capture)

```
$imageUrl = $client->buildImageUrl('https://example.com');

$imageUrl = $client->buildImageUrl('https://example.com', [
    'full' => true,
    'delay' => 2,
    'vw' => 1920,
    'vh' => 1080,
]);
```

#### PDF Capture

[](#pdf-capture)

```
$pdfUrl = $client->buildPdfUrl('https://example.com');

$pdfUrl = $client->buildPdfUrl('https://example.com', [
    'format' => 'A4',
    'landscape' => true,
]);
```

#### Content Extraction

[](#content-extraction)

```
$contentUrl = $client->buildContentUrl('https://example.com');
```

#### Metadata Extraction

[](#metadata-extraction)

```
$metadataUrl = $client->buildMetadataUrl('https://example.com');
```

#### Animated GIF

[](#animated-gif)

```
$animatedUrl = $client->buildAnimatedUrl('https://example.com');
```

### Fetching Data

[](#fetching-data)

#### Fetch Image

[](#fetch-image)

```
$imageData = $client->fetchImage('https://example.com');
file_put_contents('screenshot.png', $imageData);
```

#### Fetch PDF

[](#fetch-pdf)

```
$pdfData = $client->fetchPdf('https://example.com', ['full' => true]);
file_put_contents('page.pdf', $pdfData);
```

#### Fetch Content

[](#fetch-content)

```
$content = $client->fetchContent('https://example.com');
echo $content['html'];
echo $content['textContent'];
echo $content['markdown'];
```

#### Fetch Metadata

[](#fetch-metadata)

```
$metadata = $client->fetchMetadata('https://example.com');
print_r($metadata['metadata']);
```

#### Fetch Animated GIF

[](#fetch-animated-gif)

```
$gifData = $client->fetchAnimated('https://example.com');
file_put_contents('animation.gif', $gifData);
```

Configuration Options
---------------------

[](#configuration-options)

### Constructor Options

[](#constructor-options)

- `useEdge` (bool): Use edge.capture.page instead of cdn.capture.page for faster response times
- `timeout` (int): cURL timeout in seconds. Defaults to `30`

API Endpoints
-------------

[](#api-endpoints)

The SDK supports two base URLs:

- **CDN**: `https://cdn.capture.page` (default)
- **Edge**: `https://edge.capture.page` (when `useEdge` is `true`)

License
-------

[](#license)

MIT

Links
-----

[](#links)

- [Website](https://capture.page)
- [Documentation](https://docs.capture.page)
- [GitHub](https://github.com/techulus/capture-php)

Support
-------

[](#support)

For support, please visit [capture.page](https://capture.page) or open an issue on GitHub.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance60

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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/7f99affda55e9eb0bcc30b2099b0cfc66292a0573292ecca142f6a16ecb9aca1?d=identicon)[arjunkomath](/maintainers/arjunkomath)

---

Top Contributors

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

---

Tags

apiheadless-browsersheadless-chromephprest-apiscreenshot

### Embed Badge

![Health badge](/badges/techulus-capture/health.svg)

```
[![Health](https://phpackages.com/badges/techulus-capture/health.svg)](https://phpackages.com/packages/techulus-capture)
```

###  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)[facebook/php-business-sdk

PHP SDK for Facebook Business

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

PHP wrapper for the Meilisearch API

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

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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