我正在尝试使用 Windows Azure Marketplace API 执行必应搜索,我已经下载了他们的指南和示例代码。该代码准备了一个带有基本身份验证的 HTTPS 请求,但是我经常收到以下错误:
Warning: file_get_contents(https://api.datamarket.azure.com/Data.ashx/Bing/SearchWeb/Web?Query=%27washburn%27&Adult=%27Off%27&$top=50&$format=Atom): failed to open stream: Connection refused 
php 代码(来自微软的文档):
$context = stream_context_create(array(
    'http' => array(
    'proxy' => 'tcp://127.0.0.1:8888',
    'request_fulluri' => true,
    'header'  => "Authorization: Basic " . base64_encode($accountKey.":".$accountKey)
    )
));
请问有谁知道是什么导致了错误?我已正确设置$accountKey并在浏览器中对其进行了测试。让我有点困惑的是127.0.0.1:8888,为什么在使用浏览器之前和之后都base64_encode($accountKey.":".$accountKey)需要,你应该将用户名留空,只需在密码字段中输入帐户密钥?$accountKey: