Skip to content

Take screenshot and get body HTML in once? #727

Answered by Kian987
Kian987 asked this question in Q&A
Discussion options

You must be logged in to vote

Damn it. Right now I realized it was very simple.

// Initialize Browsershot with all your options
$instance = Browsershot::url($data['target']);

// Save image
$instance->save($path_to_image);

// Get DOM
$html = $instance->bodyHTML();

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@klkvsk
Comment options

Answer selected by Kian987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants