Grow your CSS skills. Land your dream job.

Make page snapshot using PHP

  • # August 6, 2011 at 1:50 pm

    Hi, I need a PHP script that can make web page snapshot and save it on the server, user don’t need do anything, just click on link.

    # August 7, 2011 at 11:03 am

    I looked into this a while back, you need to render the page somewhere and grab that image – EASY!!

    Or so I thought. See http://stackoverflow.com/questions/757675/website-screenshots-using-php/

    Some good resources within that, but I ‘gave up’ on the idea as it would require too many resources. I used the favicon of the site instead to ‘tie-in’ the link.

    # August 7, 2011 at 11:45 am

    you want to take a snapshot of a page that the server serves?

    # August 7, 2011 at 11:50 am

    I made an assumption that the screenshot is not of a site on the same server – like Googles search results now provide a screenshot. You know what they say about assumptions :-)

    # August 9, 2011 at 3:06 pm

    The best way to do it, is to use the client to do it for you with javascript and canavas.

    Here is a good script: html2canvas

    # August 9, 2011 at 5:11 pm

    Ok, thanks

    # February 19, 2013 at 5:58 pm

    I found this place after A LOT of googling. You can use a really simple API to auto-generate screenshots and save them down.

    [MPZImg.com](http://www.mpzimg.com “MPZImg.com”)

    As an example, i just lifted this from the API page…
    <img src=”http://serv.mpzimg.com/?uid=APIKEY&mw=200&mh=350&theURL=http://news.bbc.co.uk”>

    Hope that helps.

    # October 18, 2013 at 6:57 am

    There are many free services out there that provide the ability to take website screenshots.

    One of the best I have found is GrabzIt.

    They have a free PHP API, to take a screenshot you just need to do something like:

    include("GrabzItClient.class.php");
    $grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");
    $grabzIt->SetImageOptions("http://www.google.com");
    $grabzIt->SaveTo("test.jpg");

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".