捕获和转换Web的工具

您如何从登录名后面截取屏幕截图?

大多数屏幕截图服务不支持在登录后截取屏幕截图,但是为了实现这一点,我们开放了在 GrabzIt 中设置 cookie 的功能。 由于网站经常使用 cookie 来识别用户,如果您将用户会话 cookie 分配给 GrabzIt,则在进行任何屏幕截图时,所有用户会话数据都将可用。

GrabzIt provides two main ways of specifying your own session cookie either via the API or on setting the cookies in your account.

指定用户的所有会话 cookie

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.

在此示例中,我们假设用户会话中只涉及一个名为 PHPSESSID 的 cookie,但也可以有多个 cookie,并且可以以不同的方式命名。 这完全取决于您如何创建网站。 开发者工具One way to debug any cookie issues, is 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 etc of this cookie to GrabzIt by using the 自定义 cookie 页面,最好使用未来很长一段时间内的到期日期来确保会话 cookie 不被删除。

To do this programmatically, 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. Then pass the all of the cookies involved in a user’s session using the SetCookie method and GrabzIt will automatically be able to user the users session.

$sessionValue = $_COOKIE['PHPSESSID'];
$grabzIt->SetCookie('PHPSESSID', 'example.com', $sessionValue);
$grabzIt->URLToImage('http://example.com/dashboard.php');
$grabzIt->Save('http://example.com/handler.php');

捕获 HTML

版面设计使用 JavaScript API 向我们发送登录后网页的 HTML。 只要 CSS、JavaScript 和图像等网页资源不受网站安全限制,它就应该正确捕获用户网页,如下所示 例子.

发布到登录表单

此登录方式 仅当您要捕获的网页是登录屏幕后的网页,或者网站提供浏览器在登录完成后将遵循的重定向 URL 时,此方法才有效。

指定基本身份验证凭据

某些网页使用基本身份验证,浏览器要求用户在显示页面之前进行身份验证。 GrabzIt 使您能够通过指定您的屏幕截图来截取这些网页 基本身份验证凭据.