← Blog
How to Capture a Website Screenshot in PHP

How to Capture a Website Screenshot in PHP

June 03, 2026

Overview

This guide covers php screenshot api using the FrameSnap API. Follow the steps below to capture screenshots programmatically in your workflow.

Steps

  1. Use file_get_contents with the API endpoint
  2. Or use Guzzle HTTP client for more control
  3. Set the API key in headers or query params
  4. Handle the image response and save to disk

API parameters that help

  • width: control the viewport width for your target use case
  • format: png for quality, jpeg for smaller files
  • delay: wait for dynamic content to load before capturing
  • full_page: capture the entire document including below-fold content

Next steps

Try the free screenshot tool or get an API key to start capturing screenshots in your own projects.

Capture Screenshots with FrameSnap

One API call. PNG, JPEG, or PDF. Free tier included.