G.kanojiya Posted January 18, 2012 Share Posted January 18, 2012 Hi all... I am facing problems in taking screenshot for the currently open page. What I want is by clicking on a link like "Click for taking Screenshot" the screenshot of that page gets generated, which can be saved further. I have tried by using "imagegrabscreen" & "imagegrabwindow" but both of them results as a big black png image, also searched forums but not able to get the perfect match. If any expert there...then plzzzzz do help me out.... Thank You Quote Link to comment https://forums.phpfreaks.com/topic/255280-taking-screenshot-of-currently-open-webpage/ Share on other sites More sharing options...
RussellReal Posted January 18, 2012 Share Posted January 18, 2012 PHP is server side, if you want a "take a screenshot" BUTTON for the END USER (E.G. Client/Browser, whatever) you're probably gonna want to look into some form of Java Applet or other embedable cross-platform/cross-browser objects/languages, as JavaScript cannot do this, PHP will only have access to the server end.. so what you're left with is a need to furnish the page with the functionality it needs, E.G. Embed a language that CAN do it.. I know for a fact Java Programming will allow it, given you sign it and get the proper permissions.. I did a few google searches and it seems Flash has some form of support for screenshots, but idk how good of an option it will be.. anyway, good luck! Quote Link to comment https://forums.phpfreaks.com/topic/255280-taking-screenshot-of-currently-open-webpage/#findComment-1308863 Share on other sites More sharing options...
G.kanojiya Posted January 18, 2012 Author Share Posted January 18, 2012 Thanx for your quick reply Russell.....so it means I need to go for another language for this functionality....but I thought it might be possible in php....its ok....will see......thanx again....tc Quote Link to comment https://forums.phpfreaks.com/topic/255280-taking-screenshot-of-currently-open-webpage/#findComment-1308875 Share on other sites More sharing options...
QuickOldCar Posted January 18, 2012 Share Posted January 18, 2012 You may need to go into services and allow apache to "interact with desktop" if getting a black screen. It needs something to actually render the image, like x-server, xvfb, a browser. If you just needed a few images done, or not planning doing a thumbserver, it may be easier to just use many of the thumbnail services available. Be aware many of the free services usually just do the domain links and not actual pages, many have limits on them and most have a pro version for more features. Just to name a few. http://wimg.ca/ http://www.thumboo.com/ www.shrinktheweb.com/ http://www.thumbalizr.com/ http://thumbnails.iwebtool.com/ http://webshotspro.com/ http://thumbnailspro.com/ http://www.sitethumbshot.com/ and there are more if searched for them... Or use an application to get them done single url or from a list. http://www.websitescreenshots.com/ If you want to spend some time and create your own, here are some helpful links. https://github.com/coderholic/PyWebShot http://www.mysql-apache-php.com/website_screenshot.htm http://www.zubrag.com/scripts/website-thumbnail-generator.php http://www.zubrag.com/forum/index.php?topic=55.0 http://www.boutell.com/webthumb/ http://www.semicomplete.com/blog/geekery/xvfb-firefox.html http://www.initsix.co.uk/headless-screenshot-server-ubuntu http://stackoverflow.com/questions/125951/command-line-program-to-create-website-screenshots-on-linux/143148#143148 http://code.google.com/p/wkhtmltopdf/ http://iecapt.sourceforge.net/ http://cutycapt.sourceforge.net/ A plugin I've used to take screenshots http://pearlcrescent.com/products/pagesaver/ follow their documentation, but use this for taking the thumbs as png -savepng Quote Link to comment https://forums.phpfreaks.com/topic/255280-taking-screenshot-of-currently-open-webpage/#findComment-1308893 Share on other sites More sharing options...
G.kanojiya Posted January 19, 2012 Author Share Posted January 19, 2012 Thanx QuickOldCar....I tried that "interact with desktop" issue but its now showing inly white screen without any image..... Your links provided are really helpfull to me....thank you so much for such a nice reply....tc:) Quote Link to comment https://forums.phpfreaks.com/topic/255280-taking-screenshot-of-currently-open-webpage/#findComment-1309133 Share on other sites More sharing options...
RussellReal Posted January 19, 2012 Share Posted January 19, 2012 you want your web server to push you a web page, you then want your web server to give you a link to screenshot a page.. this I know for certain.. but do you want your webserver to take the web server's screenshot, or the picture of the screen of the end user(client) what QuickOldCar is talking about, is for server side screenshots, not client side screenshots Quote Link to comment https://forums.phpfreaks.com/topic/255280-taking-screenshot-of-currently-open-webpage/#findComment-1309136 Share on other sites More sharing options...
G.kanojiya Posted January 19, 2012 Author Share Posted January 19, 2012 Yes Russel...i know...the same i required as you have mentioned....but from your valuable reply i came to know that it will need some "Java Applet or other embedable cross-platform/cross-browser objects/languages" for doing this all....i admit i am not that much expert in php to try all these....so after reading Quick's post i thought to give a try to what he is suggesting....thank you,you both to spend your precious time to provide me a solution..... Quote Link to comment https://forums.phpfreaks.com/topic/255280-taking-screenshot-of-currently-open-webpage/#findComment-1309139 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.