/    Sign up×
Community /Pin to ProfileBookmark

Capture screenshot image entire page

How to capture screenshot image entire page using php?

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@NogDogOct 07.2013 — Well, first you'll need to find some software that will render the page into an image on the server side, since PHP itself is not a web browser. Alternatively, there are some services (probably not free) that you can use via their API to get a screenshot based on a URL, though performance may be an issue since you'd have to wait for the image to be returned across the 'net.
Copy linkTweet thisAlerts:
@priyankagoundOct 08.2013 — Well..Screengrab! saves webpages as images... but not for new versions of Firefox.

it is possible, to capture a website with PHP singularly.

imagegrabscreen — Captures the whole screen.

Below is the example code to take a screenshot of the current screen and save it as a png image:

<?php

$im = imagegrabscreen();

imagepng($im, "myscreenshot.png");

imagedestroy($im);

?>

Hope this helps.
Copy linkTweet thisAlerts:
@NogDogOct 08.2013 — Well..Screengrab! saves webpages as images... but not for new versions of Firefox.

it is possible, to capture a website with PHP singularly.

imagegrabscreen &#8212; Captures the whole screen.

Below is the example code to take a screenshot of the current screen and save it as a png image:

<?php

$im = imagegrabscreen();

imagepng($im, "myscreenshot.png");

imagedestroy($im);

?>

Hope this helps.[/QUOTE]


Note that (a) this is only available on Windows, and (b) probably not much use if running it on a web server, where the primary display is most likely not a web browser showing the web page of interest.
Copy linkTweet thisAlerts:
@ravi366Jun 10.2019 — Hi @priyankagound#1290665

The above code is taking the screenshot only for the visible part.

Will you please help me out that how can i take the full page screenshot from this code?

Thanks.

Kumar Ravi
×

Success!

Help @lara123 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...