October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk8 min

Take Website Screenshots with PHP and Chrome on Shared Hosting

PHP can control Chrome for website screenshots only when your shared host permits browser processes and provides the required executable, dependencies, and resources. Here are the PHP library and CLI routes, checks, and fallbacks.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yes—PHP can capture a website screenshot by controlling a Chrome or Chromium executable, but shared hosting does not guarantee that the browser can run. First confirm that your account permits PHP to launch processes, has a compatible browser and its dependencies, and provides enough resources. If it does, use a PHP Chrome library or Chrome’s command line; if it does not, use a remote screenshot API or move the capture job to an environment that supports browser processes.

How the PHP-and-Chrome approach works

A PHP library such as chrome-php/chrome does not render pages itself: it controls a Chrome or Chromium executable available to the PHP process. Chrome’s headless mode runs without a visible browser window; current unified headless mode uses the regular Chrome browser code path. The older, separate chrome-headless-shell implementation is available as a distinct binary beginning with Chrome 132, so check which browser binary your host provides. Chrome’s headless-mode documentation

There are two local routes: call Chrome through a PHP library for browser-level control, or invoke Chrome’s command-line screenshot flags for a simpler capture. Either route depends on the hosting account’s actual configuration. PHP documents exec() as a way to run an external program, but that does not mean a particular shared-hosting plan enables it. PHP manual: exec()

Check whether your shared host can run Chrome

Check the account that will run the capture, not just the provider’s general plan description. Web PHP and command-line PHP can use different configurations, paths, and limits, and the host’s acceptable-use rules also matter.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
  • Can you access the account through SSH or another supported shell?
  • Is Chrome or Chromium installed, or can you install a compatible executable in your user space? Record its exact path.
  • Can the relevant PHP SAPI launch external processes? Check whether functions such as exec() or proc_open() are disabled; PHP’s disable_functions setting can affect this. PHP manual: core php.ini directives
  • Are the browser’s runtime libraries available, and can the PHP worker write to temporary and browser-profile directories?
  • What limits apply to memory, CPU, process count, execution time, storage, and concurrent browser launches? PHP configuration includes resource controls such as memory_limit; the applicable values depend on the account and PHP SAPI. PHP manual: core php.ini directives
  • Does the provider permit browser automation and the traffic your target sites will receive? Can the job run under CLI PHP or cron, and are those environments configured the same way as web PHP?

These are account-specific checks. Neither PHP nor Chrome documentation can certify that a particular shared-hosting account supports browser automation.

Route 1: Use a PHP library to control local Chrome

The chrome-php/chrome project documents a PHP interface for headless Chrome and Chromium, including navigation and screenshots. Its requirements as displayed when researched list PHP 7.4–8.5 and Chrome/Chromium 65 or newer; check the requirements for the exact package release you install rather than assuming those version ranges remain unchanged. The project documents selecting a browser executable with CHROME_PATH or by passing a browser name or executable path to BrowserFactory. Project README and requirements

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Install the package with Composer in your application if your host supports it, then adapt this example to your installed release and browser path:

<?php

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

use HeadlessChromiumBrowserFactory;

$factory = new BrowserFactory('/path/to/chrome');
$browser = $factory->createBrowser();

try {
    $page = $browser->createPage();
    $page->navigate('https://example.com/')->waitForNavigation();
    $page->screenshot()->saveToFile('/path/outside-public-web-root/page.png');
} finally {
    $browser->close();
}

Replace /path/to/chrome with the executable path confirmed on your account, and choose an output directory writable by the PHP worker. The project documents PNG, JPEG, and WebP output, clipping a region, and full-page capture options; consult the README for the exact method and options supported by your installed release. chrome-php/chrome documentation

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Keep URLs, commands, and screenshot files under control

  • Do not build a shell command from a URL, filename, or other value supplied directly by an untrusted user. PHP advises escaping shell arguments when user input is involved; safer still, validate allowed destinations and use the library API where appropriate. PHP manual: exec()
  • Do not write captures to arbitrary user-selected paths. Store them in an application-controlled directory, preferably outside the public web root, and use non-guessable names if files must be retrievable.
  • Set practical limits on concurrent jobs and clean up temporary browser profiles and output files. On shared hosting, resource and storage limits are set by the host and PHP configuration, not by the screenshot library alone.

Route 2: Run Chrome’s screenshot command

For a basic viewport capture, Chrome’s official command-line reference gives this form:

chrome --headless --screenshot --window-size=412,892 https://example.com/

Chrome writes screenshot.png to the current working directory. Set the working directory deliberately so the output lands somewhere PHP can access and your application can protect. The --window-size flag sets the viewport dimensions in this example; Chrome also documents --timeout to capture after a bounded wait even if page loading continues. That can help with pages that keep loading resources, but a fixed wait does not guarantee that every site’s content has finished rendering. Chrome Headless command-line reference

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

If a PHP script invokes the binary, use an executable path confirmed on the host and carefully handle every argument. Never concatenate an untrusted URL into a shell command; PHP’s documentation covers escaping arguments when invoking external programs. PHP manual: exec()

Choose local Chrome or a remote capture service

Consideration Local Chrome on shared hosting Remote screenshot service
Host compatibility Requires a runnable browser, dependencies, process permissions, writable temporary storage, and sufficient account resources. Does not require Chrome to run on your shared host; your application sends a request to the service.
Control A PHP library exposes browser navigation and page behavior; direct CLI flags suit simpler captures. Options depend on the provider’s API.
Capture scope Library and command-line capabilities differ. Confirm viewport, full-page or element capture, and wait behavior for your chosen route. Check supported dimensions, full-page capture, waits, and other options before choosing a service.
Operations You manage browser versions, processes, temporary files, concurrency, logs, and retries within host limits. The vendor operates the rendering service; you still need to handle API credentials, failures, retries, and any vendor limits.
Privacy and security Rendering stays on the host you control, but protect target URLs, cookies, credentials, and screenshot files. Review where URLs and page content are processed, retention terms, credential handling, and privacy practices.
Cost and limits Depends on the hosting plan and its resource limits; no general price or performance figure applies. Compare current prices, quotas, resolution, throughput, and timeouts. No comparable vendor price or performance figure is established here.

If local execution is blocked, a remote API is one fallback; another is running the capture job on a server or hosting plan that supports browser processes. For example, ChromeHeadless.io documents a PHP client and remote export endpoint, including a full-page option. That establishes an available service category, not a current pricing comparison or a guarantee of service quality; verify the provider’s current limits and security terms before sending it URLs or credentials.

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.
Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common problems and how to troubleshoot them

  • “Function exec() has been disabled” or a similar process error: the PHP configuration used by that request may disable process functions. Ask the host whether a permitted PHP API or CLI/cron route is available; do not assume that web PHP and CLI PHP share settings.
  • Chrome executable not found: check the binary’s exact path and permissions as the PHP account sees them. Set the library’s executable path explicitly or confirm CHROME_PATH is available in the relevant environment.
  • Chrome exits immediately or reports missing libraries: the browser may depend on runtime libraries absent from the account. Ask the host whether those dependencies can be supplied; if not, use a supported remote service or another execution environment.
  • Screenshot call times out or the page is incomplete: the page may still be loading, the host’s execution limit may be too short, or the target site may depend on delayed content. Check the PHP and host time limits, use an appropriate navigation or bounded wait, and avoid assuming a fixed delay fits every page.
  • Permission denied while saving: verify that the destination directory exists and is writable by the PHP worker. Keep output in an application-controlled location rather than broadening permissions unnecessarily.
  • Works from SSH but not from the website: web PHP may run under a different user, SAPI, PATH, environment, or configuration. Test using the same execution route as production and ask the host about its web-worker restrictions.
  • Captures fail under load: browser processes consume account resources, and concurrent jobs can hit process, memory, or CPU limits. Reduce concurrency, queue work, and log failures rather than launching unbounded captures.

Or skip the browser setup

If the host cannot run Chrome, ScreenshotNeo accepts a URL in one request and returns an image or PDF. Its cleanup options accept cookie or consent banners before capture and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. It also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents.

cURL example, with the API documentation at screenshotneo.com/docs:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/ -o shot.webp

Replace YOUR_API_KEY with your key. The supplied request returns the response body to shot.webp; check the API documentation for parameters and response behavior relevant to your integration. ScreenshotNeo includes 1,000 screenshots per month free with no card, and paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month—no card required.

Questions developers ask

Can PHP take a screenshot without Chrome?

For a rendered website screenshot using the local approach described here, PHP needs to control a browser executable such as Chrome or Chromium. A remote screenshot API moves browser rendering off the shared host.

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

Does a shared host always block headless Chrome?

No universal answer is established. Permissions, installed binaries, dependencies, resource limits, and hosting policy vary by account, so confirm them with your provider.

Will the Chrome CLI command capture an entire page?

The example command sets a viewport size and saves a screenshot. For full-page capture, use a library option that documents full-page support or verify the exact Chrome feature and version you plan to use; do not treat viewport capture as a full-page image.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.