Webをキャプチャして変換するツール

ログインの背後からどのようにスクリーンショットを撮りますか?

ほとんどのスクリーンショット サービスは、ログイン後のスクリーンショットの撮影をサポートしていませんが、これを可能にするために、GrabzIt で Cookie を設定する機能を公開しました。 Web サイトではユーザーを識別するために 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.

この例では、ユーザーのセッションに関与する Cookie が PHPSESSID という XNUMX つだけであると想定していますが、複数存在する可能性や、別の名前が付けられる可能性があります。 それはすべて、Web サイトをどのように作成したかによって異なります。 開発者ツール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 ログインの背後にある Web ページの HTML を送信します。 CSS、JavaScript、画像などの Web ページ リソースが Web サイトのセキュリティによって制限されていない限り、次のようにユーザーの Web ページを正しくキャプチャする必要があります。 .

ログインフォームに投稿する

このログイン方法は は、キャプチャしたい Web ページがログイン画面の直後の Web ページである場合、またはログイン完了後にブラウザがたどるリダイレクト URL を Web サイトが提供している場合にのみ機能します。

基本認証資格情報の指定

一部の Web ページでは基本認証が使用され、ブラウザーはページを表示する前にユーザーに認証を要求します。 GrabzIt を使用すると、これらの Web ページのスクリーンショットを指定することができます。 基本認証資格情報.