PHP Classes
elePHPant
Icontem

Webshots: Get a screenshot of a page using the plsein API

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (8)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-01-13 (20 hours ago) RSS 2.0 feedStarStarStarStar 73%Total: 1,435 This week: 8All time: 2,662 This week: 76Up
Version License PHP version Categories
webshots 1.0.5Free To Use But R...5PHP 5, Graphics, Web services
Description Author

This class can Get a screenshot of a page using the plsein API.

It can send a HTTP request to the plsein.in API Web server to get a screenshot of a Web page given its URL.

The API returns the URL for the screenshot image. The class retrieves and copies the screenshot image file to a given local file.

Name: PLSCIS PLP <contact>
Classes: 3 packages by
Country: India India
Innovation award
Innovation award
Nominee: 1x

Details
Api parameters:-

1) api url: http://pls-e.in/api/webshots

2) post parameters:
   > params: array containing req. info about class file to be generated
		> url: url of webpage (e.g.: http://www.example.com)
		> height: optional height of image (only positive integer)
		> width: optional width of image (only positive integer)
		> fullpage: y means image will be of whole page and n means not
		> trim: y means it will try to remove extra white space surrounding the image
		> webshot: optional parameter to create webshot instead of guaranteed fullpage image
		> cropTop: optional parameter to crop image from top instead of center
	> ui: array containing user identification parameters
		> sec_code: value of secret code (will be available from profile page)
		> key: value of secret key (will be available from profile page)

3) response:
	> date: image content if image is generated
	> er: error information if any error occured during image creation

> Below example is just a demo for how to call api and use its out-put and you can even use its out-put in different way

> but we will recommend to call it from ajax, store image at their end once obtained from this api and use that image for multiple loading as direct loading will take much more time for the page to load.

> also almost every time image will be png but if you face problem where it gives jpeg image then please check image's mime type beforing storing / creating image st your end.

> due to caching some time, image same as that of previous call might be send on subsequent calls even if urls of webpage for which image is req. are different; to prevent this append random unique time based parameter to end of api url (as done in below example)

> In-case of any doubt, please feel free to contact us through contact page on our website http://pls-e.in/site/contact
  Files folder image Files  
File Role Description
Plain text file readme.txt Doc. documentation file
Plain text file webshots.php Class url to image
Plain text file webshots_test.php Example demo script to use webshots class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,435
This week:8
All time:2,662
This week:76Up
User Ratings User Comments (2)
 All time
Utility:95%StarStarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:79%StarStarStarStar
Examples:87%StarStarStarStarStar
Tests:-
Videos:-
Overall:73%StarStarStarStar
Rank:201
 
good job :)
5 years ago (tomtheman)
77%StarStarStarStar
This is a good and useful class :-)
5 years ago (José Filipe Lopes Santos)
80%StarStarStarStarStar