Welcome to WebmasterWorld Guest from 54.196.144.242

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Screen capture with PHP?

     
10:01 am on Sep 24, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 3, 2004
posts:78
votes: 0


Hello,

Back with another strange request... ;)

I would like to write a script that allows me to make screenshots of websites.

Ideally, I feed the script a list of URLs and the script returns screenshots of the URL's web page.

Do know if it's possible?

Thanks!

4:45 pm on Sept 24, 2005 (gmt 0)

New User

10+ Year Member

joined:June 3, 2005
posts:21
votes: 0


First of all, this kind of functionality will be browser specific. I have been using website (browsercam dot com), which offers this kind of services for testing cross-browser compatibility against IE/Firefox/Opera/Safari etc...
And i have seen really funny looking screenshots with interesting error messages. And thoses error messages will reveal some specifics about implementation of that website. It seems, like there are multiple computers with different opsystems and/or browsers online 24/7 and all the screen capturing is done with real browsers. And seems, that this is not very reliable method (it will give many, many errors). But it seems to be best at this time.
Now, if you want some simple method, like only Internet Explorer based screenshots, then you can use Windows based server and Apache/PHP. Then write some simple C/C++/Delphi based command line utility to execute IE and make screenshots. Or find similar ready-to-use freeware/shareware utils. Now use PHP system() function to pass data to command line utility. Thats all ...
Another choice - Linux server/Apache/PHP and Mozilla browser.
Of course, i suggest to be very paranoid about potential security issues with new exploits popping up every day :)
4:57 pm on Sept 24, 2005 (gmt 0)

Moderator

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8326
votes: 155


Viewing a page is a client-side operation. PHP doesn't really have any idea what a page looks like, because it doesn't render it and it can't force a client to display it.

AFAIK the sites like browsercam and the one that show in Safari all have to bring the page up on an actual client and then do an actual screen capture. I'm not sure what language the brograms are written in, but I think it's safe to say it's not PHP.

9:47 pm on Sept 26, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 9, 2004
posts:169
votes: 0


do you want an image file or html..? curl perhaps?
10:01 pm on Sept 26, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 3, 2004
posts:78
votes: 0


Hi,

Ideally I would like a thumbnail...

10:08 pm on Sept 26, 2005 (gmt 0)

Preferred Member

10+ Year Member

joined:May 27, 2005
posts:614
votes: 0


Now THATS a facinating idea....

I wonder if instead of thumbnails of a website, you could infact shrink the webpage (using iframes?)and then just display it as a thumbnail on a page with others?

That would create a unique toy by which people could see multiple websites and click on the small one to open it out.

10:17 pm on Sept 26, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 3, 2004
posts:78
votes: 0


Yeah, in an ideal world where you have 1TB bandwith! LOL
11:26 pm on Sept 26, 2005 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12541
votes: 1


See if one of these previous WebmasterWorld discussions is what you are looking for ...

How can i create screenshot of url? [webmasterworld.com]
How to get website thumbnails? [webmasterworld.com]