homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Screen capture with PHP?

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


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?




 4:45 pm on Sep 24, 2005 (gmt 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 Sep 24, 2005 (gmt 0)

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 Sep 26, 2005 (gmt 0)

do you want an image file or html..? curl perhaps?


 10:01 pm on Sep 26, 2005 (gmt 0)


Ideally I would like a thumbnail...


 10:08 pm on Sep 26, 2005 (gmt 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 Sep 26, 2005 (gmt 0)

Yeah, in an ideal world where you have 1TB bandwith! LOL


 11:26 pm on Sep 26, 2005 (gmt 0)

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]

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved