/ Published in: PHP

Capture Web Screenshots easily with the [GrabzIt ](http://grabz.it/) PHP API
You will need the free [GrabzIt Code Library](http://grabz.it/api/php/download.aspx) to get started.
You will need the free [GrabzIt Code Library](http://grabz.it/api/php/download.aspx) to get started.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* * The PHP file that takes the picture */ include("GrabzItClient.class.php"); //Create the GrabzItClient class //Replace "APPLICATION KEY", "APPLICATION SECRET" with the values from your account! $grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET"); //Take the picture the method will return the unique identifier assigned to this task $id = $grabzIt->TakePicture("http://www.google.com", "http://www.example.com/GrabzItHandler.php"); /* * The GrabzItHandler file that saves the picture */ include("GrabzItClient.class.php"); $message = $_GET["message"]; $customId = $_GET["customid"]; $id = $_GET["id"]; $filename = $_GET["filename"]; //Custom id can be used to store user ids or whatever is needed for the later processing of the //resulting screenshot $grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET"); $result = $grabzIt->GetPicture($id); if (!$result) { return; } //Ensure that the application has the correct rights for this directory.
Comments
