Page 1 of 1
Website snapshots?
Posted: Tue Feb 19, 2008 12:57 pm
by JellyFish
You know how on alexa.com and ask.com they have snapshot/previews images of websites. For example on
alexa.com you see all the little thumbnails of the web addresses?
Could this be done in php on the server? Or will I need to use some executable on my server or something? How is this usually done?
Thanks for reading.
Re: Website snapshots?
Posted: Tue Feb 19, 2008 1:07 pm
by Christopher
There are some ActiveX components that will do this on windows and a plugin for firefox. If you could run it through a browser on the command line that would probably be the fastest renderer. There may also be utilities that do this.
Re: Website snapshots?
Posted: Tue Feb 19, 2008 1:31 pm
by JellyFish
arborint wrote:There are some ActiveX components that will do this on windows and a plugin for firefox. If you could run it through a browser on the command line that would probably be the fastest renderer. There may also be utilities that do this.
There wouldn't be a way to do this in scripting would there? That is maybe a php library or something of that nature?
Re: Website snapshots?
Posted: Tue Feb 19, 2008 1:34 pm
by Luke
Rendering an entire website (basically a browser) is definitely beyond the scope of a php script. There are services that provide an API for it though.
Re: Website snapshots?
Posted: Tue Feb 19, 2008 1:38 pm
by JellyFish
The Ninja Space Goat wrote:Rendering an entire website (basically a browser) is definitely beyond the scope of a php script. There are services that provide an API for it though.
I see. Would you happen to know the name of the sevices. Also what is 'this' called by the way?
Re: Website snapshots?
Posted: Tue Feb 19, 2008 1:40 pm
by Luke
Re: Website snapshots?
Posted: Tue Feb 19, 2008 1:46 pm
by Zoxive
http://lists.nyphp.org/pipermail/talk/2 ... 20039.html
A better solution is to use Firefox:
1. Run Xvfb instead of a real X server so that you don't need to attach to a monitor.
2. Run firefox supplying the URL as a command-line parm.
3. Run xwininfo to find the proper root window.
4. Run import from imagemagick to get an image of that window.
Re: Website snapshots?
Posted: Tue Feb 19, 2008 1:52 pm
by Luke
nice... that's a cool solution. JellyFish, I'd go what what Zoxive said.
Re: Website snapshots?
Posted: Tue Feb 19, 2008 2:09 pm
by JellyFish
I'm not quite sure I'm familiar with everything Zoxive said. But I'm starting to wonder if any of this would work on a shared hosted server?
Re: Website snapshots?
Posted: Tue Feb 19, 2008 2:20 pm
by Zoxive
JellyFish wrote:I'm not quite sure I'm familiar with everything Zoxive said. But I'm starting to wonder if any of this would work on a shared hosted server?
Nope, because they won't even have Firefox installed.
Re: Website snapshots?
Posted: Tue Feb 19, 2008 5:24 pm
by Chris Corbyn
I'd say OS X's
WebKit can do this. Not 100% though, but it's the engine which powers safari and the dock etc.