Capture Screenshots using Php??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
illmapu
Forum Commoner
Posts: 47
Joined: Fri Aug 22, 2003 1:48 pm

Capture Screenshots using Php??

Post 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!

:wink:
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post 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.
illmapu
Forum Commoner
Posts: 47
Joined: Fri Aug 22, 2003 1:48 pm

where to find on alexa

Post 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!

:o
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post 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*)
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post 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.
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

Well my site has been up for a year.. it should have a SS by now :P
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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.
Post Reply