Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
June 30, 2008 - Submit Your Site for the July 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 19, 2008, 10:38:36 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Automating website screenshots?  (Read 550 times)
oxsley
Galactic Royalty
*****
Offline Offline

Posts: 364


« on: June 10, 2006, 12:02:46 PM »

I'm looking for suggestions and ideas how you might program a tool that automatically captures website screenshots, such that you could incorporate them into a website directory, etc.

To give an idea of what I'm looking to do, try out this site I came across:
http://webshots.velocitysc.com/WebshotSandbox.aspx

Now my question is, how is such a thing programmed? Let's say I wanted to develop a website directory where users could submit their websites/URLs, then on some periodic basis, a script went out, took snapshots of the websites, and incorporated them automatically into a directory.

How would you go about translating the site's html into a visual graphic .jpg file?  Any ideas?
Logged
GMTurner
Berserker Poster
*****
Offline Offline

Posts: 7553



WWW
« Reply #1 on: June 10, 2006, 02:02:31 PM »

Just looking at the page... it's a asp.net script it appears... I'm brushing up and relearning things with asp.net code now so this might become one of my learning projects... just to see if I can figure out a way to do it...

Oh, and I will say that site does not work with redirects apparently... our work site redirects requests for domain/ to domain/index.php and it doesn't seem to follow the redirect... gets stuck in a loop...
Logged

The above post was made at a time when I gave a dang and doesn't necessarily reflect my current views or opinions.

For those no longer with us ... Grr..!!

The Redheaded Penguin
oxsley
Galactic Royalty
*****
Offline Offline

Posts: 364


« Reply #2 on: June 10, 2006, 04:07:15 PM »

It's an interesting programming problem to solve. There are probably some scripts out there if I look hard enough. I am familiar with the PHP image manipulation functions. And, I would guess ASP and other languages have similar functions to create, edit and save image files. However, I am not sure how you translate someone's souce HTML code into an image file. It seems you'd need a whole HTML/CSS parsing engine to do that....i.e., the core of a web browser.

And you'd have to worry about HTML 4.01 loose, strict, XHTML 1.0, etc. You probably wouldn't want to have to re-code an entire web browser, HTML-rendering engine. Hmmm... Would the answer be to somehow use a browser from a command-line, shell-command, etc? Or, could you get your hands on a freeware version of a browser-core that you could run from inside a PHP/ASP script? Hmmm... just thinking out loud here....
« Last Edit: June 10, 2006, 04:21:12 PM by oxsley » Logged
oxsley
Galactic Royalty
*****
Offline Offline

Posts: 364


« Reply #3 on: June 10, 2006, 05:27:29 PM »

Of course, you could just cheat and use a not-so-friendly method. Just write a script that goes to the website above, populates and submits the form, then parses the resulting HTML and saves the image to your server. I wonder how long it would take before they blocked my IP address or put in some bot-blocker verification scheme.

But that wouldn't be very nice. So, I will keep trying to figure out my own way.
Logged
nathanm
Newbie
*
Offline Offline

Posts: 1


« Reply #4 on: June 18, 2006, 05:09:03 PM »

You can download a command line utility that will allow you to take screenshots of websites at http://www.nathanm.com/index.php/webshot-website-screenshot-capturing/
Logged
Danielle
Resident Alien
Administrator
Berserker Poster
*****
Offline Offline

Posts: 8876


nihil sunt omnia


WWW
« Reply #5 on: June 18, 2006, 07:16:30 PM »

You could simply just use Ma.gnolia too.  That's what it basically does...

I have it on my sidebar on Ruby Asylum.  Have people sign up to Ma.gnolia, then ask them to provide their Ma.gnolia url on your site where you would list their sites as a directory. It would be the easiest way to do it straight off while you work out how to do it yourself or build the scripts necessary to do it yourself.
Logged

Danielle Wallace
- nihil sunt omnia -
Lunarpages Webhosting ~ Lunarpages Forums ~ Lunarpages Affiliates
Administrator Training Manager - System Administrator Team


Ruby Asylum - For those crazy about Ruby
A&E Writing Forum ~ Best Garden ~ Endar & Endar Gallery ~ RatingBar.com

Every living creature on this earth dies alone.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM