Skip to content
View GrabzIt's full-sized avatar
Block or Report

Block or report GrabzIt

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
GrabzIt/README.md

Convert the Web!

GrabzIt aspires to allow any programming language no matter how basic to turn a website or HTML into a fully rendered Image, video, PDF, DOCX. As well as converting HTML tables into JSON, XML, CSV or Excel and online videos into animated GIF's.

To do this we provide client libraries that enables a developer to create a capture, once complete, our server then sends a callback to your app to allow it to be processed.

While we currently support ASP.NET, Java, Javascript, Node.js, PHP, Perl, Python and Ruby we aim to create a library for as many programming languages as possible. If you would like to help us achieve this please do!

Example

We have made the programming libraries as simple as possible to use. To create a capture you must first call a method that specifies what you want to capture such as the URLToImage method followed by the Save method. You will need a application key and application secret, but you can get these for free from https://grabz.it.

include("GrabzItClient.php");

//Create the GrabzItClient class
//Replace "APPLICATION KEY", "APPLICATION SECRET" with the values from your account!
$grabzIt = new \GrabzIt\GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");
//Take the picture the method will return the unique identifier assigned to this task
$grabzIt->URLToImage("http://www.google.com");
$id = $grabzIt->Save("http://www.example.com/handler.php");

Notice that in the above example the location of the handler.php is defined this is used to handle the callback when the capture is complete.

The handler that accepts the callback and saves the image is below.

include("GrabzItClient.php");

$message = $_GET["message"];
$customId = $_GET["customid"];
$id = $_GET["id"];
$filename = $_GET["filename"];
$format = $_GET["format"];

//Custom id can be used to store user ids or whatever is needed for the later processing of the
//resulting screenshot

$grabzIt = new \GrabzIt\GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");
$result = $grabzIt->GetResult($id);

if (!$result)
{
	return;
}

//Ensure that the application has the correct rights for this directory.
file_put_contents("results" . DIRECTORY_SEPARATOR . $filename, $result);

And that's it! Your website should now be taking screenshots!

Documentation

For further more in depth documentation go to https://grabz.it/api.

Popular repositories

  1. grabzit grabzit Public

    GrabzIt enables you to convert HTML and URL's into JPG's, PNG's, DOCX's, videos, PDF's and more. Transform online videos into animated GIF's or convert HTML tables to JSON, CSV and Excel spreadsheets.

    HTML 60 34

  2. grabzit-php grabzit-php Public

    Warning!! Sub-repository to enable easy export to packagist.

    PHP 3 1

  3. fanboy-adblock fanboy-adblock Public

    Forked from ryanbr/fanboy-adblock

    Shell

  4. GrabzitBundle GrabzitBundle Public

    Forked from tlamedia/GrabzitBundle

    PHP

  5. GrabzIt.IntraProxy GrabzIt.IntraProxy Public

    The IntraProxy is a proxy that allows intranet and localhost websites to be scraped and captured by GrabzIt's services and tools

    Java

  6. dotvvm-docs dotvvm-docs Public

    Forked from riganti/dotvvm-docs

    DotVVM documentation

    C#