PHP Classes

PHP Ultimate Web Page Capture: Capture Web page as image using ScreenshotLayer

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog (1)    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 73%Total: 2,816 This week: 2All time: 1,339 This week: 67Up
Version License PHP version Categories
screenshot 1.0GNU General Publi...5.4HTML, PHP 5, Graphics, Web services


This class can capture Web page as image using ScreenshotLayer API.

It can send a HTTP request to the ScreenshotLayer API to request the capture of an image in PNG, JPG or GIF formats from a given URL.

It can capture an image for the full page or only the visible viewport at a given size.

A given CSS may be injected in the captured page. A custom user agent string may be sent to the page Web server to emulate certain device browsers. The API may delay the capture for a given period of time.

The captured image can be resized to a given width and height. The capture results may be cached for a given period of time.

The class can return the captured image as HTML image tags, save the image to file or serve for display. The API may serve a custom placeholder image while the capture is not fully ready.


PHP Ultimate Web Page Capture
Take automatic snapshot of website

Picture of Dave Smith
  Performance   Level  
Name: Dave Smith is available for providing paid consulting. Contact Dave Smith .
Classes: 51 packages by
Country: United States United States
Age: 58
All time rank: 618 in United States United States
Week rank: 12 Up2 in United States United States Up
Innovation award
Innovation award
Nominee: 32x

Winner: 7x


example usage
screenShot ver 1.0

//include screenShot class

//instantiate the class with the webpage url to capture
$screenShot = new screenShot('');

//display html image tag for captured webpage

The following demonstrates the download and display from captured binary
of the webpage. To use, uncomment the capturePage method to capture
the binary and then uncomment either the downloadCapture or displayCapture
methods, depending on which you wish to preform.





  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example Usage
Accessible without login Plain text file license.txt Lic. License
Accessible without login Plain text file manual.txt Doc. Documentation
Plain text file screenshot.class.php Class Main Class

 Version Control Unique User Downloads Download Rankings  
This week:2
All time:1,339
This week:67Up
User Ratings User Comments (3)
 All time
paid version bah!
5 years ago (K)
Fantastic package.
7 years ago (Michael Scott McGinn)
this is nice work.
7 years ago (Thouhedul Islam)