views:

90

answers:

1

There exists numerous solutions on generating a thumbnail or an image preview of a webpage. Some of these solutions are webs-based like websnapshots, windows libraries such as PHP's imagegrabscreen (only works on windows), and KDE's wkhtml. Many more do exist.

However, I'm looking for a GUI-less solution. Something I can create an API around and link it to php or python.

I'm comfortable with python, php, C, and shell. This is a personal project, so I'm not interested in commercial applications as I'm aware of their existence.

Any ideas?

+1  A: 

You can run a web browser or web control within Xvfb, and use something like import to capture it.

Ignacio Vazquez-Abrams
I never thought of using Xvfb; from my understanding it runs on memory. my server only has 512 mb ram. I wonder if i'll face any performance issues. Second, do you think i'll need to set up a queue for multiple requests?
dassouki
I would set up a queue for it. Xvfb is not exactly a speed demon, and having multiple instances open could get hairy fast. I wouldn't worry too much about memory though; a 32-bit 1024x768 screen only needs about 3MB.
Ignacio Vazquez-Abrams
I'll keep this question open for now, hoping other solutions popup .. meanwhile, I'll try and implement xvfb
dassouki