This script AUTHs successfully but it wont return the webpage correctly, the server returns.
HTTP/1.1 100 Continue HTTP/1.1 303 See Other Date: Thu, 18 Oct 2012
When you set the CURLOPT_POSTFIELDS with an array, CURL sets request type to multipart/form-data while server expects application/x-www-form-urlencoded, so you need to encode the string yourself with the help of urlencode