PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi, I am noway a developer but am trying to make a website where i want the image of the day from NASA added by itself like this site http://www.w3streams.com/potd/space/
I tried to post the following code to my website and it shows fine just as it should but the image does not update itself everyday. Can someone please guide me. Thanks
<a class="titlechannel" href="http://www.nasa.gov/multimedia/imagegallery/index.html" rel="nofollow">NASA Image of the Day</a>
<a href="http://www.nasa.gov/rss/image_of_the_day.rss" rel="nofollow" class="feed"> </a>
<a class="linkout" href="http://www.nasa.gov/multimedia/imagegallery/image_feature_1602.html" rel="nofollow">The Possibility of a Brand New World</a>
<div class="imgleft img250"><a rel="nofollow" href="http://www.nasa.gov/multimedia/imagegallery/index.html"><img border="0" alt="The Possibility of a Brand New World" src="http://www.nasa.gov/images/content/429888main_image_1602_516-387.jpg" style="width: 450px;"></a></div>
</div>
NASA gives an RSS feed for the daily image. Your site will need to scan the feed and extract the image location. Since the feed only gives the current image you'll probably want to store the location in a database.