So about 11 months (wow that long time ago, feels like last month) I used some code I had lying around to make some thumbnails of all the planet php blogs. Work priorities has finally allowed me to work on that code base again, and I was able to get things up to a usable state.

The result of this, is a new project. A website that lets you grab snapshots of any website at any time. The result is 3 different images, one at 800×600, one at 160×120 and one at 80×60.

I took a snapshot of mywebsite as an example.

Webthumb is still on the experimental side and the UI could use some improvements but its an interesting experiment so I thought I share it in its current state.

Now im guessing you’ll have a couple questions, so i’ll attempt to guess at a couple and answer them now.
How does it work:
I have a custom mozilla browser written in c++ that takes a url as a command line input and outputs a snapshot. This is wrapped in a bit of PHP code to generate 1 thumbnail at a time from a queue of requests.

Are you releasing the code:
The custom mozilla browser will be released under the GPL license by Uversa at op-en.org, but its not a priority right now. Im not planning on release my hack of a PHP website that it runs under at any time :-).

Is there a webservice API:
I’d really like to make one, but I don’t have deep pockets and I don’t have a solution to making a system like that pay for itself.

10 thoughts on “Webthumb”

  1. Nice hack, Josh. Unfortunately mine hasn’t shown up yet (been waiting around 10-15 minutes). It would also be neat if it could do the entire page and render it as one long image.

  2. Pingback: Links

  3. Looks like i got a stuck job in the queue that hasn’t been caught by the timeout handler :-(. I’m removing it manually.

    Snapshotting the entire page as an image might be possible but it would be quite a bit harder. Im actually using GTK to grab the snapshot right now, getting the entire page would mean figure out a mozilla api solution which is a very hard problem.

    That or some sort of hacking involving scrolling which may be possible but sounds like a lot of work (and is beyond my needs).

  4. Mine isn’t showing up either.

    Will you make this available api-style so site directories can use this to generate thumbnails for sites that they link to?

    Here is a similar website: http://v03.browsershots.org/

    This one renders the site on a whole set of different browsers. Maybe you can get some ideas from there.

  5. It seems that a large number of urls wouldn’t load complete and my they would do so in a way that it would never be caught by my timeout handler. I hacked in a extra gtk timeout to run the snapshot after 5 seconds in those situations and it got things working again. I’ll have to clean that up long term.

    Anyhow all your images are available now and things should be running smoothly.

  6. Pingback: PHPDeveloper.org

  7. There was a utility in KDE that would take screenshots from the command line, using KHTML. I can’t remember its name, right off, but IIRC it had something to do with either screensavers or desktop backgrounds.


  8. Pingback: Ajaxian » Adding AJAX to a website step by step

Comments are closed.