views:

784

answers:

5

I am wondering if there is any good way to create image of page when I have url. If people submit url's, I would like to be able to create an image of that page and store that somewhere. I am not sure if this can be done easily or not, I have no simple ideas how to do that. I was wondering before I do something really complicated, if you could share ideas, solutions etc that might help me.

I am looking for programmatic solution as I am not happy with what is offered already as online service. I would also prefer open source solution.

Good example is at http://browsershots.org/screenshots/. What software are they using?

More ideas from here: I think that a combination of WGet and html2ps would do the trick. wget downloads the web pages, html2ps renders the html files and converts them to images. html2ps will render postscript files, which would primarily be good for printing, but I'm sure that similar utilities exist to render to .jpg or what have you.

Still seeking for good ways to this.

Thanks in advance.strong text

+1  A: 

See snapshots and browsershots.

Pistos
Thanks seems that browsershots have the software I could use.
Zeljko Dakic
+2  A: 

Since Browsershots is open source, you can take a crack at their source code.

Otherwise, and you may have already ruled this out for your project, Alexa offers a web service called Alexa Site Thumbnail that "provides developers with programmatic access to thumbnail images for the home pages of web sites."

Joe Lencioni
Yes, I am looking at browsershots, they might do, but since I am currently in research phase, I would like to see if there are more alternatives.Alexa can't do because they are not guarantee that thumbnail will exist. Thanks.
Zeljko Dakic
Just adding http://trac.browsershots.org/blog since the other links are down.
Till
+2  A: 

Well, from what I think html2ps is flawed. Assuming there is no flash, no CSS, no images, it could work but if it's really an accurate representation of a website - I doubt it.

A friend of mine runs WebThumb and (while I am slightly biased) it has served me well. I should add that I never used it in production but his API is easy to integrate since he offers wrappers for different language and the integration is really great - no watermark, etc..

Also, from what I know, he uses a modified Firefox to take snapshots of websites. There might be more info on his blog.

Most of the services I've read about use a modified browser to screenshot a website - there are projects that build on Firefox and others who use WebKit. I remember there was one service that used MacOSX (and essentially Safari) but I can't remember the name right now - something like HowDoesItLookOnAMac.com. And there is a similar project with IE.

Looking at the above mentioned browsershots, they too use a browser - for example, check out INSTALL.WIN.

I guess the bottomline is browsers. :)

If you feel like you want to integrate a service, here are more links:

Till
Thank you for detailed and elaborate answer. I think I tried webthumbs initially and the quality was low, so I turned to websnapr I think, which looked good enough initially but in the end changed terms of service etc. Which is why I went this route. I will check links you sent for sure. Thanks.
Zeljko Dakic
You are right about html2ps, this didn't cross my mind. Scratch that off.
Zeljko Dakic
most services use their own proprietary solutions or just have a machine with preferred browser implementation (gecko, webkit) running and making screenshots programatically via system/cron etc.
dusoft
A: 

Check this one as well www.browserseal.com

Demiurg
A: 

I knocked up a tool to take screenshots using XULRunner (Mozilla) it might be what you are looking for, it is free and comes with source -

http://blog.builtwith.com/index.php/2010/07/02/mozilla-automated-website-screen-grabber/

gary