Tools to Capture and Convert the Web

How do you take a screenshot from behind a login?

Most screenshot services do not support taking screenshots behind a login, however to enable this we have opened up the ability to set cookies in GrabzIt. As websites often use cookies to identify a user, if you assign the users session cookie to GrabzIt all the users session data will be available when any screenshots are taken.

GrabzIt provides two main ways of doing this via a login web service or by specifying your own session cookie.

Automatically create a login cookie

  • Warning this feature is currently in beta and may not provide consistent results.

The login web service requires the form URL to submit too, along with any required form parameters, and your application key. After the web service executes any cookies are automatically saved to your account. Now when you take a screenshot of a webpage on the same domain these cookies will be used. An example of a login form to submit to is shown below.

<form action="login.php" method="post">
   <div class="FormRow">
      <input type="text" name="username" value="">
   <div class="FormRow">
      <input type="password" name="password" value="">
   <input type="submit" class="submit" value="Login">
Remember to URL encode every parameter value!

The login web service has the following format. You must specify the URL the form is being submitted to, your application key and all of the form parameters you want to submit.

Note that we do not store any of the login details you pass to us for your security. in to view your Application Key&formurl=[URL of the form]&
[form parameter one]=[form value one]&[form parameter two]=[form value two]&[form parameter ...]=[form value ...]

Below is an example of how to submit to the above login form. in to view your Application Key&formurl=

This call will return XML detailing all of the cookies that where saved to your account by this action. For the login to be successful the target websites session cookie must be listed, if it is you can now create captures of the web pages that require a logged in user.

Specifying your own login cookie

Alternatively to specify your own login cookie you can use the SetCookie method to define your own user session cookies. An example of this using PHP is shown below.

$sessionValue = $_COOKIE['PHPSESSID'];
$grabzIt->SetCookie('PHPSESSID', '', $sessionValue);

This example assumes that the PHP session cookie is named PHPSESSID. Developer ToolsOf course this is a complicated subject and so might be difficult to implement. Therefore you could attempt to debug any cookie issues, by signing into the target website and use the browsers built in developer tools, to do this in the Chrome browser just press F12. Then identify the websites session cookie and add name, domain and value of this cookie to GrabzIt by using the custom cookies page, it is a good idea to use a expiration date a long time in the future to ensure the session cookie is not deleted.

Capture the HTML

Use our JavaScript API to send us the HTML of the web page that is behind the login. As long as none of the web page resources, such as CSS, JavaScript and images, are referenced with absolute URL's or embedded in the web HTML and are not restricted by website security it should capture the users web page correctly as shown in this example.

Post to a login form

This login method will only work if the web page you want to capture is the web page directly after the login screen or if the website provides a redirect URL that the browser will follow after login is complete.

Specify Basic Authentication Credentials

Some web pages use basic authentication were the browser asks the user to authenticate themselves before displaying the page. GrabzIt enables you to screenshot these web pages by specifying your basic authentication credentials.

Back to SupportMore Web Capture ArticlesCommunity Web Capture Questions
Try all our premium features for free with a 7 day free trial. Then from $5.99 a month, unless cancelled.
  • More Captures
  • More Features
  • More API's
  • Bigger Scrapes
  • Bigger Captures
  • Bigger Everything
Start Free Trial