automated thumbnail of website?

Discussion in 'Mac Programming' started by Cybix, Oct 22, 2006.

  1. Cybix macrumors 6502a

    Cybix

    Joined:
    Feb 10, 2006
    Location:
    Western Australia
    #1
    I've got a little trick I need to perform..

    I'd like to have someone enter a web address into a web form, and be able to take that web address, goto the website, take a screenshot of the site/window, thumbnail it (resize) then save the thumbnail somewhere.

    All automatically.

    taking the url to say a flat file isnt hard.. but perhaps an applescript or simular that takes the url, opens a window in safari (goes to that site) then finder takes a window shot/screen shot of that safari window, the OS then resizes/converts the image to a thumbnail, saves it somewhere, then that safari window closes off. And perhaps Safari stays open ready for the next request.

    Unless someone can think of a better way? My servers are basically all Linux, with no X11... so i wonder if throwing a MAC into the mix might work this process....

    ideas and thoughts are most welcome!

    Ultimately the idea is that someone can enter a url in a web form (php), the server/process goes off and visits the site, thumbnails it, throw's it in a DB, then that website's thumbnail is available for viewing on yet another web page...

    confused? heh
     
  2. HiRez macrumors 603

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #2
    It sounds like it's possible. I don't have an exact method, but using Automator, here's a sample workflow I made that kinda sorta heads in that direction. Or did you actually need the Safari window to be included in the snapshot? There are some snapshot actions as well. It does use the third-party action "Download URLs As PDFs" (freeware). There are other actions for other apps that might be useful here too, such as iPhoto, Photoshop, Transmit, etc. depending on your needs. And if there's something tricky that an action can't handle, you might be able to get an AppleScript action to do it. I'm not an AppleScript expert, but a lot of people on this board are. Good luck!

    Images_From_URLs.png
     
  3. CanadaRAM macrumors G5

    CanadaRAM

    Joined:
    Oct 11, 2004
    Location:
    On the Left Coast - Victoria BC Canada
    #3
    This is offered by an ISP here, www.islandnet.com
    They most likely programmed some or all of it themselves
     

Share This Page