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
CURLOPT_HEADER doesn't mention anything about excluding the body. http://php.net/manual/en/function.curl-setopt.php
But maybe your page is redirecting more than 10 times? Maybe add
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
and then post your new headers.
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