You don't say what error you're getting, if any. Certain errors in this scenario simply get swallowed. Try enabling the fetching of content even on failure status codes.
$data = array(
'http' => array(
// 'proxy' => 'tcp://127.0.0.1:8888',
'request_fulluri' => true,
'ignore_errors' => true, // try adding this
'header' => "Authorization: Basic $encodedKey")
);
Maybe that will help you figure things out.
ignore_errors added in PHP 5.2.10