承接 flashcapture/client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

flashcapture/client

最新稳定版本:v1.0.0

Composer 安装命令:

composer require flashcapture/client

包简介

Official PHP SDK for FlashCapture API (RapidAPI). Async website screenshots, ad-blocking & full-page capture.

README 文档

README

Official PHP client for FlashCapture API. Generate screenshots of modern websites, handle lazy-loading, ads, and full-page rendering.

Installation

composer require flashcapture/client

Usage

Native PHP

require 'vendor/autoload.php';

use FlashCapture\Client;

$flash = new Client('YOUR_RAPID_API_KEY');

try {
    // One-liner: Capture and save to disk
    $flash->captureAndSave(
        'https://laravel.com', 
        __DIR__ . '/laravel.png',
        [
            'fullPage' => true,
            'darkMode' => true,
            'width' => 1920
        ]
    );
    
    echo "Snapshot saved!";

} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}

Laravel Integration

You can easily use this in a Laravel Controller or Job.

public function store(Request $request)
{
    $client = new \FlashCapture\Client(env('RAPID_API_KEY'));
    
    // Start the job asynchronously
    $jobId = $client->capture($request->input('url'));
    
    // Dispatch a Laravel Job to check status later
    CheckScreenshotStatus::dispatch($jobId)->delay(now()->addSeconds(5));
    
    return response()->json(['job_id' => $jobId]);
}

Options

Option Type Default Description
fullPage bool false Capture full scrollable page
darkMode bool false Force dark mode rendering
hideElements array [] CSS selectors to remove (ads, popups)
// ... voir la doc complète

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-20