GrabzIt
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">
      <label>Username</label>
      <input type="text" name="username" value="">
   </div>
   <div class="FormRow">
      <label>Password</label>
      <input type="password" name="password" value="">
   </div>
   <input type="submit" class="submit" value="Login">
</form>

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.

https://api.grabz.it/services/login.ashx?key=Sign 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.

https://api.grabz.it/services/login.ashx?key=Sign in to view your Application Key&formurl=http://www.example.com/login.php&username=joebloggs&password=12345

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', 'example.com', $sessionValue);
$grabzIt->URLToImage('http://example.com/dashboard.php');
$grabzIt->Save('http://example.com/handler.php');

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.

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 screenshot 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 Screenshots
  • Bigger Everything
Start Free Trial