Your post saved me... Can you tell me exactly what you mean by "the header must be in the form of an array".
$requestHeaders = array('http' => array(
'method'=>"GET",
'header'=> "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10\r\n" .
"CustomHeader: ".CUST_HEADER_VALUE."\r\n".
"CustomHeader1: ".CUST_HEADER_VALUE1."\r\n",
)
);
The above is the normal way, and you say array, can you please show us, since I am sure as you are aware lots of people are having this issue and no where to go.