FTP Photo using Linux script

Please provide sample linux shell script to retrieve a photo from a Panasonic Security camera using a http command and then transfer to ftp server. I am using Linux O/S 2.6.32 KERNEL

Script steps:
Retrieve still picture from a Panasonic camera using the following http command alarmserver/cgi-bin/camera?resolution=1920 This command will retrieve a still picture from my Panasonic camera and display it in my browser. I am able to use the browser �Save As� command to save this picture as a .jpg file. The default photo file name is camera.jpg, but I want the file name to be Bus1+<current date and time>.jpg

Transfer this picture to my windows FTP server site �EventPhotos� at 10.0.0.51
User: busprotect
Password: busprotect
The picture name should be Bus1+<current date and time>.jpg

Perhaps something like this:

#!/bin/bash
#
#

# set the url to the security camera
url="<insert url to camera image here>"

# create a temp directory to hold the downloaded
# images
tmpDir="/tmp/camphotos"
if [ ! -d $tmpDir ]
then
    mkdir $tmpDir
fi

# use curl command to fetch the file and rename it
# on the fly
cd $tmpDir
curl -L -o Bus1+$(date +'%m%d%Y_%T').jpg -C - $url

# store the name of the file we just downloaded
new_image=$(ls -ltr $tmpDir | tail -n1 | awk '{print $NF}')

# use curl to upload it to ftp server
curl -u busprotect:busprotect -T $new_image ftp://10.0.0.51/

# done
exit 0

76c8abfb508c3ff189fd695be44b05e3