PHP Classes

WebThumbnail: Capture a screenshot of a page using WebThumbnail

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (6 months ago) RSS 2.0 feedNot enough user ratingsTotal: 2,035 All time: 1,929 This week: 73Up
Version License PHP version Categories
webthumbnail 1.10BSD License5.3PHP 5, Web services, Geography


This class can capture a screenshot of a page using WebThumbnail.

It can send a HTTP request to the WebThumbnail API Web server to request the capture of a screenshot of a given URL.

The service will queue the request to capture the specified page screenshot using one of the supported browsers: Firefox, Google Chrome or Opera.

The screenshot image may be capture with sizes between 70 by 70 and 2048 by 4096 pixels.

The class polls the capture server to determine when the screenshot is ready to download.

The retrieved screenshot image can be copied to a local file or served for download as the current script output in the PNG, JPEG or GIF formats.

Innovation Award
PHP Programming Innovation award nominee
May 2012
Number 2

Prize: One subscription to the PDF edition of the PHP Architect magazine
Some sites need to show previews of how a page of another site looks.

This class can generate image previews of a given site page using the WebThumbnail service.

Manuel Lemos
Picture of Lukasz Cepowski
Name: Lukasz Cepowski <contact>
Classes: 3 packages by
Country: Poland Poland
Age: 36
All time rank: 118929 in Poland Poland
Week rank: 185 Up4 in Poland Poland Up
Innovation award
Innovation award
Nominee: 1x




ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
$root = dirname(dirname(__FILE__));

$thumb = new Webthumbnail("");


              _     _   _                     _                 _ _
__      _____| |__ | |_| |__  _   _ _ __ ___ | |__  _ __   __ _(_) |
\ \ /\ / / _ \ '_ \| __| '_ \| | | | '_ ` _ \| '_ \| '_ \ / _` | | |
 \ V  V /  __/ |_) | |_| | | | |_| | | | | | | |_) | | | | (_| | | |
  \_/\_/ \___|_.__/ \__|_| |_|\__,_|_| |_| |_|_.__/|_| |_|\__,_|_|_|


           The simplest way to get a website screenshot!

This repository contains legacy code and is no longer maintaned!

The has recently been rebranded to<br /> Visit for more information and new PHP client library.

1) What is The is a free webapi for capturing website screenshots. Shortly speaking it is an web based application that you can simply integrate with your website and have thumbnails of any website on demand.

This project is a simple php client for using the directly from the php code. It can be used in any php application, distributed under the terms of the BSD license.

2) How to use the api? The simples case is to just call the api from pure html code.

<img src="" alt="Captured by" />

It will show a screenshot of directly on your website.

3) How to capture a website screenshot from php?

$thumb = new Webthumbnail(""); $thumb


4) How to capture a website screenshot and save it to a disk file?

$thumb = new Webthumbnail(""); $thumb


5) Need more info? Visit

Feel free to test and use the application :)

  Files folder image Files  
File Role Description
Files folder imageexamples (3 files)
Accessible without login Plain text file .project Data Auxiliary data
Accessible without login Plain text file Doc. Documentation
Plain text file webthumbnail.php Class The PHP wrapper class for

  Files folder image Files  /  examples  
File Role Description
  Accessible without login Plain text file capture_to_browser.php Example Example, how to capture a website screenshot and send the image to the browser.
  Accessible without login Plain text file capture_to_file.php Example Example, how to capture a website screenshot and save the image into a disk file.
  Accessible without login Plain text file capture_without_delay.php Example Example script

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:1,929
This week:73Up