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.

Specify all of a user's session cookies

If you specify all of the user's session cookies then when you create a capture of a secure web page GrabzIt will create a capture as the user would see it, this is very useful if you want to do things like capture a report in a user's dashboard etc. To do this you need to use a server-side language as JavaScript won’t have access to the HTTP only cookies often associated with a user's session cookies.

To do this pass the all of the cookies involved in a user’s session using the SetCookie method.

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

In this example we are assuming there is only one cookie involved in the user's session called PHPSESSID, however there could be more than one and could be named differently. It all depends on how you have created your website. Developer ToolsOne way 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 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.