Sunday, February 19, 2012

4 new help pages

We have added 4 new help pages to help you get the most out of Browshot:

  • wget: use wget from the command line to request screenshots and thumbnails
  • curl: use curl from the command line to request screenshots and thumbnails
  • fetch: use fetch from the command line to request screenshots and thumbnails
  • POST data and Referrer: access pages requiring authentication, take a screenshot after filling out a form, etc.
You can use your favorite command line tool to request screenshots with the help of the 3 examples above.

Did you know the average time to get a screenshot is only 15 seconds? This includes the loading time of the target page. We have already served more than 320,000 screenshots and many more thumbnails.

Sunday, February 5, 2012

API 1.5: Referrer and POST data

We have introduced two new arguments in the API 1.5: Referrer and POST data. These options are used to customize the HTTP requests done by Browshot.

Referrer

The HTTP Referrer header indicates the page previously visited. Some websites use it to display different content for users coming from a Google search, for example, for users who come from a different page on the domain, etc.

Example:

Set the HTTP Referrer to http://www.google.com/?q=test:

refer=http%3A%2F%2Fwww.google.com%2F%3Fq%3Dtest



POST data

You can now send POST request with custom data. This is useful to take the screenshot of page after filling out a form. This can be used to take screenshots of a page behind a login form for example.

Make sure you encode the POST Data correctly if you do not use one of Browshot's library.


Example

Send a logjn=foo and password=bar:

post_data=login%3Dfoo%26password%3Dbar


The library have been updated to version 1.5, but previous versions can handle the 2 new options as well.


These new options are supported with premium browsers only.