You are here: Re: Web Page Screenshot « PHP Programming Language « IT news, forums, messages
Re: Web Page Screenshot

Posted by Chris Hope on 04/17/07 00:55

Krustov wrote:

> <comp.lang.php>
> <Toby A Inkster>
> <Mon, 16 Apr 2007 18:31:26 +0100>
> <egocf4-4kp.ln1@ophelia.g5n.co.uk>
>
>> > In your opinion - what are the problems ?
>>
>> There aren't any problems per se -- it's just far too big a problem
>> for one programmer to complete in two hours. It's a task that's
>> measured in "man-years" rather than "man-hours".
>>
>
> Even if the end result is only to produce a small thumbnail ? .

Of course. Whether it's a thumbnail or not, you're going to need to
render it somewhat like the page actually is, which means you need to
be able to parse table layouts, CSS positioning, etc etc. It takes a
lot of time to get this working.

I think it might have been Toby who posted here in the past a method of
capturing screenshots of websites using a browser and scripting. I have
utilised this method myself and it works really well. An example of
this is below.

This is on a Linux system. You may or may not be able to do it on other
systems, but it works nicely for me. I run Opera fullscreen on a
1024x768 screen:

system("opera -remote 'openURL($url)'");
sleep(30);
system("import -display :0 -window root temp/$filename.jpg");

The 30 second sleep gives it time to have all the images etc downloaded.
I probably don't need to make it wait that long - just being safe.

--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация