curl script to download files from Secured HTTPS server?

curl -# -v -d "sendusername=myname&password=mypassword&wheretogo=download.php" -L -o test.zip http://www.ims-dm.com/cgi/securedownload.php?p=HIREFTPM\&prodtype=hire/test.zip
* About to connect() to www.ims-dm.com port 80
*   Trying 209.61.193.139... connected
* Connected to www.ims-dm.com (209.61.193.139) port 80
> POST /cgi/securedownload.php?p=HIREFTPM&prodtype=hire/test.zip
 HTTP/1.1
> User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Host: www.ims-dm.com
> Accept: */*
> Content-Length: 56
> Content-Type: application/x-www-form-urlencoded
>
> sendusername=myname&password=mypassword&wheretogo=download.phpHTTP/1.1 200 OK
< Date: Wed, 16 Nov 2011 20:44:57 GMT
< Server: Apache/1.3.41
< X-Powered-By: PHP/5.2.13
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: Keep-Alive
< Age: 0
######################################################################## 100.0%* Connection #0 to host www.ims-dm.com left intact

* Closing connection #0

i'm trying to download a file from secured https server. so far i have tried this. bit it is downloading a html instead of zip file.

Please suggest me.

What you get as the contents of that HTML file may indicate what's going wrong, or what you need to do next.