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:


# Your username and password

# Size of the map to download

# Web address of the cloud map

# 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} \

# 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}"

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

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

Birthday Earth Images