If you wish to use a script to download the image, you will need to supply your username and password to the server. For example, using wget:
wget --user=username --password=password http://www.xplanetclouds.com/clouds/2048/clouds_2048.jpg

Using curl:
curl -o clouds.jpg -u username:password http://www.xplanetclouds.com/clouds/2048/clouds_2048.jpg


You can use the HTTP If-Modified-Since header to check if the image has updated before downloading. The script below shows examples using wget and curl:

#!/bin/bash

# Your username and password
user=user
pass=pass

# Size of the map to download
pixels=2048

# Web address of the cloud map
remoteDir=http://xplanetclouds.com/clouds/${pixels}
cloudFile=clouds_${pixels}.jpg

# Where you want to put the cloud map
cd ${HOME}/.xplanet/images/

# Examples using wget and curl are below.  

# Retrieve using wget, checking if the timestamp of the 
# remote file is newer than the existing one.

wget -N --user=${user} --password=${pass} \
    ${remoteDir}/${cloudFile}

# options to curl
curlOpts="-u ${user}:${pass} -R -o ${cloudFile}"

# if a cloud file exists, use its timestamp to determine 
# whether to download the new one
if [ -f ${cloudFile} ]; then
    curlOpts="-z ${cloudFile} ${curlOpts}"
fi

# comment out wget above and uncomment this if you'd
# rather use curl.

# curl ${curlOpts} ${remoteDir}/${cloudFile}
	    


Birthday Earth Images