Do you really need the snapshot? If you have the URL, you can display the actual page any time you need it in an iframe.
I have never used imagegrabwindow but it has limitations and issues that you may not want to live with. Link.
There are services available (with APIs) that are built to take such snapshots. Some have a limited free service so if you are only doing this occasionally, that might be good enough. You have to pay for the service if you don't want the limitations.
LinkYou could save the page to a PDF using HTML2PDF (or some other PDF creation tool). You should be able to save the resulting PDF file directly to a folder on your server. You don't necessarily have to save the PDF file into the database. You can just save the (unique) name of the PDF into the database record and leave the actual PDF in a folder reserved for that purpose.
baloch123 commented: Thanks +1
chrishea 182 Nearly a Posting Virtuoso
grekos commented: Very helpful, honest post. Made me think a little more realisticly then I previously was. +0
Zagga commented: Great post +5