![]() |
Getting an image from a website
Every day, NASA's Astronomy site puts up a new image. What I'm wondering is how could I check to see if there is a new image, and if so display it (download it, or something). I don't even know if this is possible.
If you can help at all, please let me know. |
Re: Getting an image from a website
In what? In VB, you have the Inet control. You download the homepage and find "<IMG SRC=""" (2 double quotes is a double quote w/o ending the string). Then you take what's between that and """". That is your path. Again using the Inet control, download the image using the path extracted, and save it to a location. Then you can do whatever with it.
|
Re: Getting an image from a website
Quote:
|
Re: Getting an image from a website
Quote:
|
Re: Getting an image from a website
is it just me.. or does the pic for 6/5 ( http://antwrp.gsfc.nasa.gov/apod/ima...ollo17_big.jpg ) look fake?
|
Re: Getting an image from a website
I would use a cron script that would download the page with wget, delete the html file, then rename the .jpg to the file that you are displaying on your webpage.
|
Re: Getting an image from a website
Quote:
A lot of the pictures on there are sweet none-the-less, even if they are fake, though. Joe: Thanks, I'll try that and see what happens. |
Re: Getting an image from a website
Quote:
|
Re: Getting an image from a website
Quote:
|
Re: Getting an image from a website
Quote:
|
Re: Getting an image from a website
I currently have my home computer set up to download the Astronomy Picture of the Day every day, resize it, and put it in my background rotation automatically.
To do it, I used a combination of DailyStrips and ImageMagick. Full instructions are on my web site at http://zansstuff.com/rotatedesktop.html#apod If you just want to display it on another web site, DailyStrips is a Perl script, and you could set it up to run as a chron job (and write a little script to rename each day's file to a constant name or modify the Perl to always output the same name), or you could modify it so that it displayed the fetched image as an output when called by a browser. |
Re: Getting an image from a website
Quote:
and if you got a wad of cash and was told you can either use it all up, or you can use half of it to let everyone believe you used it all up, and you keep the rest,which would you do? :D |
Re: Getting an image from a website
Quote:
--Also....elvis is surely still alive! |
Re: Getting an image from a website
The .NET Framework includes a class named WebRequest that will do what you're asking. You give it a URL and it returns the results as a stream. Then you just read the stream and write it to disk. Check MSDN, there is probably some sample code available.
|
Re: Getting an image from a website
Quote:
"you don't think they spend 200 dollars on a hammer, 500 bucks on a toliot seat do you?" |
| All times are GMT -5. The time now is 15:23. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi