<?php /* Online PHP Examples with Source Code website: http://4evertutorials.blogspot.com/ */ include("GrabzItClient.class.php"); $grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");// Replace "APPLICATION KEY", "APPLICATION SECRET" with the values from your account! // To take a image screenshot $grabzIt->SetImageOptions("http://www.google.com"); // Or to take a PDF screenshot $grabzIt->SetPDFOptions("http://www.google.com"); // Or to capture table(s) $grabzIt->SetTableOptions("http://www.google.com"); ?>
Above code is used to create class object with your account API key and secret after creating object we are calling 3 different methods SetImageOptions used to capture image of given page output, SetPDFOptions used to create PDF of given url and SetTableOptions is used to extract tables from the web page.
More Options
There are many more options including; configuring the browser height, browser width, screenshot height, screenshot width, the delay before a screenshot is taken and the image format of the screenshot. For all these options please see the Client documentation.
0 comments:
Post a Comment