Get a Free Trial

Client with Perl

Download
Perl API

Description

This class handles all communication with the GrabzIt screenshot web services.

Public Methods

GetResult($id)

This method returns the screenshot itself. If nothing is returned then something has gone wrong or the screenshot is not ready yet.

Parameters

Return Value

The capture


URLToAnimation($url, $options)

Specifiy the URL of the online video that should be converted into a animated GIF.

Parameters

Return Value

void

GrabzItAnimationOptions

The class represents all of the options available when creating an animated GIF.

Public Properties


URLToImage($url, $options)

Specifies the URL that should be converted into a image screenshot.

Parameters

Return Value

void

HTMLToImage($html, $options)

Specifies the HTML that should be converted into a image.

Parameters

Return Value

void

FileToImage($path, $options)

Specifies a HTML file that should be converted into a image.

Parameters

Return Value

void

GrabzItImageOptions

The class represents all of the options available when creating image captures.

Public Properties

Public Methods


URLToVideo($url, $options)

Specifies the URL that should be converted into a video.

Parameters

Return Value

void

HTMLToVideo($html, $options)

Specifies the HTML that the video should be captured from.

Parameters

Return Value

void

FileToVideo($path, $options)

Specifies a HTML file that should be converted into a video.

Parameters

Return Value

void

GrabzItVideoOptions

The class represents all of the options available when creating a video of a webpage.

Public Properties

Public Methods


URLToRenderedHTML($url, $options = null)

Specifies the URL that should be converted into rendered HTML.

Parameters

Return Value

void

HTMLToRenderedHTML($html, $options = null)

Specifies the HTML that should be converted into rendered HTML.

Parameters

Return Value

void

FileToRenderedHTML($path, $options = null)

Specifies a HTML file that should be converted into rendered HTML.

Parameters

Return Value

void

GrabzItHTMLOptions

The class represents all of the options available when creating rendered HTML captures.

Public Properties

Public Methods


URLToPDF($url, $options)

Specifies the URL that should be converted into a PDF.

Parameters

Return Value

void

HTMLToPDF($html, $options)

Specifies the HTML that should be converted into a PDF.

Parameters

Return Value

void

FileToPDF($path, $options)

Specifies a HTML file that should be converted into a PDF.

Parameters

Return Value

void

GrabzItPDFOptions

The class represents all of the options available when creating PDF captures.

Public Properties

Public Methods


URLToDOCX($url, $options)

Specifies the URL that should be converted into a DOCX.

Parameters

Return Value

void

HTMLToDOCX($html, $options)

Specifies the HTML that should be converted into a DOCX.

Parameters

Return Value

void

FileToDOCX($path, $options)

Specifies a HTML file that should be converted into a DOCX.

Parameters

Return Value

void

GrabzItDOCXOptions

The class represents all of the options available when creating DOCX captures.

Public Properties

Public Methods


URLToTable($url, $options)

Specifies the URL that the HTML tables should be extracted from.

Parameters

Return Value

void

HTMLToTable($html, $options)

Specifies the HTML that the HTML tables should be extracted from.

Parameters

Return Value

void

FileToTable($path, $options)

Specifies a HTML file that the HTML tables should be extracted from.

Parameters

Return Value

void

GrabzItTableOptions

The class represents all of the options available when converting HTML tables to CSV, XLSX or JSON.

Public Properties

Public Methods


This is the recommended method of saving a file

Save($callBackURL = '')

Save the result asynchronously and returns a unique identifier, which can be used to get the screenshot with the GetResult method.

Parameters

Return Value

The unique identifier of the screenshot otherwise if a error has occured an exception is thrown. This can be used to get the screenshot with the GetResult method


Warning this method is synchronous so will cause a application to pause while the result is processed

SaveTo()

Save the result synchronously to a variable containing the screenshot byte data.

Return Value

returns the byte data of the file if successful otherwise it throws an exception.


Warning this method is synchronous so will cause a application to pause while the result is processed

SaveTo($saveToFile)

Save the result synchronously to a file.

Parameters

Return Value

returns the 1 if it is successful otherwise it throws an exception.


GetStatus($id)

Get the current status of a GrabzIt screenshot.

Parameters

Return Value

GrabzItStatus object


GetCookies($domain)

Get all the cookies that GrabzIt is using for a particular domain. This may include user defined cookies as well.

Parameters

Return Value

GrabzItCookie array


SetCookie($name, $domain, $value = '', $path = '/', $httponly = 0, $expires = '')

Sets a new custom cookie on GrabzIt, if the custom cookie has the same name and domain as a global cookie the global cookie is overridden.

This can be useful if a websites functionality is controlled by cookies.

Parameters

Return Value

1 if the cookie is successfully set, otherwise 0


DeleteCookie($name, $domain)

Delete a custom cookie or block a global cookie from being used

Parameters

Return Value

1 if the cookie is successfully deleted, otherwise 0


GetWaterMarks()

Get your uploaded custom watermarks

Return Value

GrabzItWaterMark array


GetWaterMark($identifier)

Return your custom watermarks that matches the specified identifier

Parameters

Return Value

GrabzItWaterMark


AddWaterMark($identifier, $path, $xpos, $ypos)

Add a new custom watermark

Parameters

Return Value

returns 1 if the watermark was successfully set


DeleteWaterMark($identifier)

Delete a custom watermark

Parameters

Return Value

returns 1 if the watermark was successfully deleted


UseSSL($value)

Specifies if requests to GrabzIt's API should use SSL or not

Parameters


Result Classes

GrabzItCookie

Public Methods

GrabzItStatus

The class representing the current status of the screenshot.

Public Methods

GrabzItWaterMark

This class represents the custom watermarks stored in GrabzIt

Public Methods