Windows Azure Authentication for Bing Search in PHP

前端 未结 1 1749
醉酒成梦
醉酒成梦 2021-01-07 05:55

I am trying to perform a Bing Search by using the Windows Azure Marketplace API, I have downloaded their guide and sample code. The code prepares a HTTPS request with basic

相关标签:
1条回答
  • 2021-01-07 06:05

    I have solved it and here is what I have found for future people that would be doing the same thing:

    I commented out the line where it says:

    'proxy' => 'tcp://127.0.0.1:8888',
    'request_fulluri' => true,
    

    and also set base64_encode("ignored:".$accountKey) instead

    Base on what I read on MSDN, the username part is said to be ignored, so it shouldn't matter what value it is. I was thinking perhaps the length or the special characters in the key screwed things up so I replaces it with ignored (or anything really).

    That did the trick and I can parse the returned JSON data. Good luck!

    0 讨论(0)
提交回复
热议问题