views:

90

answers:

2

There is the URL of page on the Internet. I need to get a screenshot of this page (no matter in which browser).

I need a script (PHP, Python (even Django framework)) that receives the URL (string) and output screenshot-file at the exit (file gif, png, jpg).

UPD:

I need dynamically create a page where opposite to URL will be placed screenshot of the page with the same URL.

+4  A: 

Why do you need a script when you can use a service from another site?
Check for example what I am using: WebSnapr http://www.websnapr.com/
Or check http://www.google.ro/search?ie=UTF-8&q=website+thumbnail if something else fits your request.

Parkyprg
@Parkyprg, I need dynamically create a page where opposite to URL will be placed screenshot of the page with the same URL.
Kalinin
Those services ussualy returns a thumbnail of the corresponding URL. You can request such a job in the background (or on saving data) and you can store it in a database (to reuse it latter) or just display it (I would go for the first one).
Parkyprg
@Parkyprg, Can this be done automatically (I have about 1000 sites (url))
Kalinin
Do you mean bulk? Choose a service, signup if necessary, and using a loop cycle thru all your urls, make the service request and store the generated thumb.
Parkyprg
A: 

You can use, as I do, the shotbox API

It's in french, but still, quickly:

  • Use h t t p://add.shotbot.net/k=key/url where key is your API key and url... the page you want as a screenshot
  • Use h t t p://static.shotbot.net/md5url/format.jpg or h t t p://cache.shotbot.net/s=format/url where format can be 80 (80x60), 92 (92x69), 120 (ascreen 120x90), 160 (160x120), 240 (240x180), 320 (320x240), 1024 (1024x768)

To get your API key : http://translate.google.fr/translate?hl=fr&sl=fr&tl=en&u=http%3A%2F%2Fwww.shotbot.net%2Fcreer-un-compte-webmaster.php

Chouchenos