Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a real browser engine, not PHP’s HTTP client, to capture a rendered full page. In PHP, the shortest path is Spatie Browsershot, which drives headless Chrome through Puppeteer:

<?php
require __DIR__ . '/vendor/autoload.php';

use SpatieBrowsershotBrowsershot;

Browsershot::url('https://example.com')
    ->fullPage()
    ->save(__DIR__ . '/full-page.png');

The fullPage() call tells the browser to use the page’s full scrollable height instead of only the visible viewport. The rest of this guide covers installation, readiness and lazy-loading issues, image quality, Playwright PHP, hosted capture, troubleshooting, and a no-browser-operations alternative.

What a full-page screenshot requires

A screenshot is produced after a browser lays out HTML, runs JavaScript, applies CSS, loads fonts and images, and establishes any required session state. PHP alone can download source HTML, but it cannot reliably reproduce that rendered state. Your application therefore needs a browser runtime such as Chromium, Firefox, or WebKit, plus a PHP library that controls it.

  • Browser engine: headless Chrome/Chromium for Browsershot and Puppeteer, or a browser supported by Playwright.
  • Navigation and readiness: a URL, login/session state when needed, and a wait strategy for JavaScript and lazy content.
  • Capture settings: full-page mode, viewport/device emulation, output format, scale, timeout, and destination path.
  • Deployment support: executable browser binaries, fonts, shared libraries, sandbox permissions, temporary storage, and enough memory for tall pages.

There is no universal wait value that works for every site. Animated components, delayed API responses, login redirects and lazy images must be checked against the pages you actually capture.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Method 1: Spatie Browsershot

Install the PHP package and browser stack

Install Browsershot with Composer and follow the current package documentation for its Puppeteer and Chrome requirements. The package and its examples are maintained in the Spatie Browsershot repository; image-specific usage is documented in Creating images. Browser installation is part of your deployment, not an optional add-on. Confirm that the PHP process can execute the installed Node/Puppeteer and browser binaries on your operating system.

Minimal full-page PNG

<?php
require __DIR__ . '/vendor/autoload.php';

use SpatieBrowsershotBrowsershot;

$url = 'https://example.com';
$output = __DIR__ . '/screenshots/example-full.png';

Browsershot::url($url)
    ->fullPage()
    ->save($output);

echo "Saved to {$output}n";

This captures the rendered page and writes a PNG. Create the destination directory first and ensure it is writable by the PHP user.

Control viewport and pixel density

A full-page image still uses a viewport width. Set a desktop or mobile width when the responsive layout matters, and use a device scale factor when you need denser pixels. Browsershot documents scale factors such as 2 or 3; higher scale increases output dimensions and storage requirements.

<?php
use SpatieBrowsershotBrowsershot;

Browsershot::url('https://example.com')
    ->windowSize(1440, 900)
    ->deviceScaleFactor(2)
    ->fullPage()
    ->save(__DIR__ . '/screenshots/desktop@2x.png');

Use a lower scale for archives or large batches, and a higher scale only when the consuming workflow benefits from it. Test the resulting pixel dimensions rather than assuming that CSS pixels and output pixels are identical.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Wait for application content

Capture only after the content that matters has rendered. Depending on the Browsershot version and your page, use its documented waiting methods (for example, a delay or waiting for a selector) and verify the result. A fixed delay can be simple but may waste time or still be too short; a selector is usually more meaningful when the application exposes a reliable “loaded” element.

<?php
Browsershot::url('https://example.com/dashboard')
    ->waitForSelector('.report-complete')
    ->fullPage()
    ->save(__DIR__ . '/screenshots/report.png');

If the page loads content only while scrolling, test whether the target site’s lazy-loading code responds to the browser’s full-page capture. When it does not, scroll or trigger the application’s loading behavior before taking the final image, using the current Browsershot/Puppeteer API supported by your installed version.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Authenticated pages and deterministic output

Private pages require the same cookies, headers or login flow that a normal browser session would use. Keep credentials out of source control and pass only the minimum session data. Disable or wait for animations when visual diffs must be stable, and set a fixed viewport, timezone and locale where your application’s layout changes with those values.

Method 2: Playwright from PHP

Playwright is another browser-automation route. Its PHP project examples show launching a browser, navigating, and saving a screenshot; browser installation is a separate setup step. The project supports Chromium, Firefox and WebKit, so confirm the current package and runtime requirements in the Playwright PHP repository before deployment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Full-page capture with the Playwright API

Playwright’s screenshot API uses fullPage: true to capture the full scrollable page. It also documents path, format, scale, masking and timeout controls.

<?php
// Illustrative structure; use the namespace and bootstrap shown by
// the Playwright PHP version you install.

$browser = $playwright->chromium->launch();
$page = $browser->newPage([
    'viewport' => ['width' => 1440, 'height' => 900],
]);
$page->goto('https://example.com', ['timeout' => 90000]);
$page->waitForLoadState('networkidle');
$page->screenshot([
    'path' => __DIR__ . '/screenshots/playwright-full.png',
    'fullPage' => true,
    'type' => 'png',
]);
$browser->close();

Method names and bootstrap details can vary with the installed Playwright PHP release, so copy the repository’s example for that release and retain the fullPage option. Do not assume that networkidle means every visual element is ready: pages with polling, third-party widgets or delayed image decoding still need a page-specific check.

Choosing between Browsershot, Playwright PHP, and a hosted API

Approach PHP integration Browser operation Full-page controls Where it runs
Browsershot Concise PHP facade around Puppeteer Install and maintain the required Node/Puppeteer/Chrome stack fullPage(), documented device and scale controls Your server or worker
Playwright PHP Direct browser automation API Install Playwright browsers separately fullPage: true, format, scale, masking and timeout Your server or worker
Hosted capture API HTTP request from PHP Provider operates the browser infrastructure Depends on the provider’s API Provider’s service

The cited projects document these controls, but they do not establish a controlled benchmark for speed, reliability or cost. Choose self-hosting when browser placement, private-network access or deep automation control is important; choose a hosted service when you prefer an HTTP boundary and do not want to operate browsers.

Output formats, page size, and large documents

PNG, JPEG, and WebP considerations

PNG preserves sharp text and is useful for pixel comparison, but very tall pages can become large. JPEG usually produces smaller photographic images at the cost of compression artifacts. WebP can reduce size when your downstream tools support it. Select the format exposed by your installed library, then verify that the written file opens correctly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Very tall pages

Full-page mode creates one image whose height is determined by the document. Long dashboards and feeds can consume substantial memory and may exceed limits in image viewers or storage systems. Capture a representative tall page during development, inspect the dimensions, and set operational limits or split the page when one giant bitmap is not practical.

PDF instead of one image

If the real requirement is a printable document, use a browser PDF API rather than forcing a multi-screen page into one bitmap. Define paper size, margins, orientation and page ranges in the API you choose, then inspect page breaks, background graphics and font loading.

Reliable capture checklist

  1. Install the PHP package and the exact browser/runtime dependencies documented for its version and operating system.
  2. Run a short script as the same user and container account that production will use.
  3. Set the viewport width and device scale required by your design or test baseline.
  4. Navigate to the final URL, including any necessary authentication state.
  5. Wait for a meaningful selector or application-ready signal; use a timeout appropriate to the page.
  6. Enable full-page capture and write to a known, writable path.
  7. Open the image and check the bottom of the page, lazy images, fonts, sticky headers and overlays.
  8. Record failures, duration and output size in your job system so repeated problems can be diagnosed.

Troubleshooting common failures

“Browser executable not found” or launch failure

Cause: Chrome/Chromium or a Playwright browser was not installed, or the process cannot find its path. Fix: install the browser binaries required by the package version, configure the documented executable path if needed, and test under the production user rather than your interactive shell.

Permission denied when saving

Cause: the destination directory is absent or not writable by PHP-FPM, a queue worker or the container user. Fix: create a dedicated output directory, grant only the required permissions, and use an absolute path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The screenshot stops at the viewport

Cause: full-page mode was omitted, or the page is inside a scrollable container rather than the document. Fix: enable fullPage() or fullPage: true; for an inner panel, capture that element or adjust the page so its content is part of the document scroll.

Images or text are missing

Cause: lazy loading, web fonts, blocked resources, a premature capture, or a failed request. Fix: wait for a known image/content selector, allow enough navigation time, inspect browser logs and network failures, and test the target URL from the same network environment as the worker.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Cookie banners, chat boxes, or ads cover content

Cause: the page rendered visitor-facing overlays. Fix: automate consent where permitted, hide known selectors before capture, or use a capture service that removes common overlays. Do not remove elements that are part of the content you intend to document.

Blank page, CAPTCHA, or login redirect

Cause: bot protection, an expired session, geo restrictions, or a navigation failure. Fix: verify the URL and credentials, capture from an allowed environment, record the final URL and response status, and treat a challenge page as a failed capture rather than a valid screenshot.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Inconsistent screenshots

Cause: animations, rotating content, time-dependent data, fonts or third-party widgets. Fix: freeze test data where possible, wait for fonts and key selectors, use a fixed viewport and locale, and hide or mask regions that are intentionally nondeterministic.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup: ScreenshotNeo

ScreenshotNeo provides a website screenshot API and MCP server for developers. One GET request returns PNG, JPEG, WebP or a PDF, while the service operates the browser pipeline for you. It accepts cookie/consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; each step can be turned off.

Only clean shots are billed. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and response headers identify the page verdict and whether it was billed. Its MCP server exposes take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients.

For PHP, call the API directly (see the ScreenshotNeo documentation):

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<?php
$url = 'https://stripe.com';
$query = http_build_query([
    'access_key' => 'YOUR_API_KEY',
    'url' => $url,
]);

$context = stream_context_create([
    'http' => [
        'timeout' => 90,
        'ignore_errors' => true,
    ],
]);
$data = file_get_contents(
    "https://api.screenshotneo.com/v1/shot?{$query}",
    false,
    $context
);
if ($data === false) {
    throw new RuntimeException('Screenshot request failed');
}
file_put_contents(__DIR__ . '/shot.webp', $data);

Equivalent requests in other environments are useful for a mixed stack:

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot failed: ${res.status}`);
require('fs').writeFileSync('shot.webp', Buffer.from(await res.arrayBuffer()));

ScreenshotNeo also supports full-page capture with lazy images loaded, CSS-selector element capture, dark mode, 12 device presets and custom viewports, retina scale, custom CSS and JavaScript, click-before-capture, selector hiding, selector/delay/network-idle waits, request blocking, headers/cookies/user agents/Authorization, timezone and geolocation, transparent backgrounds, resizing, configurable-TTL caching, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API and an OpenAPI specification. Parameter names used by other screenshot APIs also work, which can simplify migration.

Plans are Free: 1,000 shots/month with no card; Starter: $5 for 3,000; Growth: $15 for 15,000; Pro: $39 for 60,000; Scale: $99 for 250,000; and Business: $249 for 1,000,000. Yearly billing gives two months free, and every feature is on every plan. Create a free ScreenshotNeo account to get 1,000 screenshots a month without a card.

Security and operations

  • Keep API keys, cookies and Authorization headers in a secret manager; never embed them in public HTML.
  • Restrict outbound capture targets when URLs can be supplied by users, to reduce server-side request forgery risk.
  • Use queue workers for slow or numerous captures and enforce per-job timeouts.
  • Store screenshots with controlled retention because they may contain personal or confidential data.
  • Pin and review browser/package versions, then retest after upgrades because rendering behavior can change.
  • Capture diagnostic metadata such as URL, final URL, viewport, browser version, verdict, duration and file size.

Frequently Asked Questions

Can PHP take a full-page screenshot without JavaScript?

Not reliably for modern rendered sites. PHP must control a browser engine, directly through Browsershot or Playwright, or indirectly through a hosted screenshot API.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What does full-page mean in browser screenshot APIs?

It means the capture covers the document’s full scrollable height rather than only the current viewport. It does not automatically guarantee that every lazy-loaded or iframe-contained element has rendered.

Should I use PNG or JPEG?

Use PNG for sharp text and visual comparisons; consider JPEG or WebP when smaller files matter and your downstream systems support them.

Is a hosted API suitable for private pages?

Only when its authentication and data-handling model meets your requirements. Otherwise, run the browser inside your own environment and keep session data under your control.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.