Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 10 of 10
  1. #1
    Senior Member
    Join Date
    Nov 2013
    Posts
    146
    Member #
    37737
    Liked
    15 times

    Get screenshot for site remotely

    For a little project I'm making that is more for myself than anybody else (but other people can certainly use it when it is done) I need to collect a screenshot of a remote site, resizing it into a small image, and store it in my server, and then periodically update it. Does anybody have experience with this? Also, as a side note, I need to retrieve the favicon and store that as well as refresh it periodically. Not all sites have it at the root of the site /favicon.ico. Thank you!
    Last edited by noodles415; Aug 08th, 2015 at 10:48 PM.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,865
    Member #
    5580
    Liked
    731 times
    Doing this requires having your own server at home (like your computer as a server), or using an online service to do it for you. Online services are not free, but they are easy to use. The favicon part might be harder, I've never dealt with that.

    As everyone knows, it's easy to use your browser to get a screenshot, and then a photo editor to resize it, etc. But from a website, there is no browser. It's the webhost server. It's possible a shared webhost has a service of their own to grab screenshots, but none that I know of. That's why you would need to have your own webhost server at home. There is software available for servers. It's not easy having a home server connected to the internet either ... that's a whole different topic.

    It's also possible to have a webhost account (such as GoDaddy), like a dedicated server, or virtual server, that allows you to upload various classes or execution of shell commands to do it also. That stuff is more advanced.

    So going back to online services ....

    Here's an online service you can use (API).
    Screenshot Websites or Scrape Websites with GrabzIt

    It puts their logo on the screenshot unless you pay for the service.

    Here's another one:
    Thumboo - Website Thumbnail Generator
    Last edited by mlseim; Aug 09th, 2015 at 09:53 AM.


  4. #3
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,482
    Member #
    425
    Liked
    2784 times
    I haven't tried this yet myself, but supposedly it's possible in ASP.net.

    Capture Screenshot (Snapshot) Image of Website (Web Page) in ASP.Net using C# and VB.Net
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,865
    Member #
    5580
    Liked
    731 times
    Can you do that level of scripting on a shared webhost?


  6. #5
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,482
    Member #
    425
    Liked
    2784 times
    There's nothing in anything they're referencing in that article that would suggest you couldn't. If you're building an ASP.net site and doing it properly, you're compiling it in all likelihood...which means that the "scripting" involved is all contained within DLLs in the bin folder of the site. There's an occasional issue involving Trust and a DLL, but it's pretty rare.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  7. #6
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,865
    Member #
    5580
    Liked
    731 times
    Sounds too advanced for even myself ... but I don't do ASP.net


  8. #7
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,482
    Member #
    425
    Liked
    2784 times
    .NET is a beast, no question. But that's what makes it fun! You know, if you're a masochistic bastard like me.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  9. #8
    Senior Member
    Join Date
    Nov 2013
    Posts
    146
    Member #
    37737
    Liked
    15 times
    Quote Originally Posted by mlseim View Post
    Doing this requires having your own server at home (like your computer as a server), or using an online service to do it for you. Online services are not free, but they are easy to use. The favicon part might be harder, I've never dealt with that.

    As everyone knows, it's easy to use your browser to get a screenshot, and then a photo editor to resize it, etc. But from a website, there is no browser. It's the webhost server. It's possible a shared webhost has a service of their own to grab screenshots, but none that I know of. That's why you would need to have your own webhost server at home. There is software available for servers. It's not easy having a home server connected to the internet either ... that's a whole different topic.

    It's also possible to have a webhost account (such as GoDaddy), like a dedicated server, or virtual server, that allows you to upload various classes or execution of shell commands to do it also. That stuff is more advanced.

    So going back to online services ....

    Here's an online service you can use (API).
    Screenshot Websites or Scrape Websites with GrabzIt

    It puts their logo on the screenshot unless you pay for the service.

    Here's another one:
    Thumboo - Website Thumbnail Generator
    Thank you - grabzit looks perfect for the screenshots and it's cheap... I don't intend to make much revenue if any from my project. I I found a few other such services as well, since I decided an API is the way to go rather than trying to do it myself.

    Regarding the favicon and the title we plan to somehow fetch the page and strip that data out of the head/css. Actually it looks like grabzit can do that as well. Interesting... For now we simply use http://URL/favicon.ico which does not always work, and a PHP explode to extract the title (only works with www. sites) and if the custom URL is not entered like http://www.example.com it does not work, but it's all a work in progress!

    I am a hosting provider so I am not worried about server access, but I'd like this to be as simple as possible. I will post a link to the project in the reviews section... thank you again for all of the help!

  10. #9
    Junior Member cvincent's Avatar
    Join Date
    Aug 2015
    Posts
    9
    Member #
    51573
    Liked
    2 times
    I recently completed a project like this. If you use OS X or a flavor of Unix or Linux, there's a command line tool called PhantomJS which basically allows you to run a "headless" browser (a browser with no UI which can be used for various purposes). One of the things you can do with it is get screenshots of webpages. You can then use ImageMagick's convert command to resize it however you like. These are great tools if you want to completely automate the process.

  11. #10
    Senior Member
    Join Date
    Nov 2013
    Posts
    146
    Member #
    37737
    Liked
    15 times
    I decided to use the grabzit service. Temporarily I'm just using the API 4x on each page load but this is not economical. Hopefully this weekend I will have it working so it caches screenshots, title, and favicon for a period of time (say, 7 days).


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:02 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com