www.webdeveloper.com
Results 1 to 4 of 4

Thread: Capture screenshot image entire page

  1. #1
    Join Date
    Sep 2013
    Posts
    22

    Capture screenshot image entire page

    How to capture screenshot image entire page using php?

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,304
    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.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Sep 2013
    Posts
    221
    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.
    strad solutionswww.stradsolutions.com

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,304
    Quote Originally Posted by priyankagound View Post
    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.
    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.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles