Page 1 of 1
Capture Screenshots using Php??
Posted: Sun Feb 01, 2004 10:08 am
by illmapu
Hi,
Does anyone know if there is a way to dynamically capture screenshots using Php?
What I'd like to do is let someone enter a url, then it automatically goes to that url and grabs a screenshot image of that particular website.
I have seen this done at Alexa.com. I assume that they do not personally capture a screenshot for each and every site.
Any advice would be helpful as to where I could start.
Thank you in advance!

Posted: Sun Feb 01, 2004 10:15 am
by markl999
Where on alexa.com does it do this?
I tried to do this a while ago but didn't have too much success. I could do it on a linux server by calling a shell command that fired up w3m-img (a command line browser that can display images) then running a command line capture script, but the results were rubbish to say the least
I'd image this is alot easier on a windows server, as you could just fire up windows apps to handle the capturing ?, and there's plenty of windows apps that do this.
where to find on alexa
Posted: Sun Feb 01, 2004 10:21 am
by illmapu
Hi,
Thanks for writing. Ok, if you goto Alexa.com and search Forums.devnetwork.net for example, go down the page to Correct errors and omissions in this listing. When you click on Correct, it takes you to a page that has Update Thumbnail Image of devnetwork.net.
Hope this helps both of us.....lol
Thanks!

Posted: Sun Feb 01, 2004 10:29 am
by markl999
hmm..interesting. Yeah, if anyone finds out how they are doing this then let me know

(unless it is a manual process *shrug*)
Posted: Sun Feb 01, 2004 11:02 am
by d3ad1ysp0rk
Posted: Sun Feb 01, 2004 11:16 am
by markl999
Hmm..if you think about it, it's probably pretty obvious. As the screenshots arn't created 'instantly' then there's no reason they couldn't just be running some 'offline' program.
This is how i used to do it, i wrote a browser in delphi that would accept a list of url's and then merrily go off any take screenshots of them all and dump them in a directory. But being able to type a url in a text box and have it instantly/dynamically generate a screenshot (online) would be nice.
Posted: Sun Feb 01, 2004 11:43 am
by d3ad1ysp0rk
Well my site has been up for a year.. it should have a SS by now

Posted: Sun Feb 01, 2004 12:38 pm
by timvw
The "easiest" way i can come up with: have a look at mcop to control your konqueror and ksnapshot programs. Then call those commands from php.