Bing API PHP v1.1 Release

It’s been a great day! And if your day wasn’t good, I’d hope this make your day. Today I’m happy to announce release of Bing API PHP. The first version really helped a lot didn’t it? This version helps you even more, now introducing setHighlightFormat($start, $end, $sources). If EnableHighlighting is enabled on your query and you use this function it will automatically format the highlighted word with your desired html element (e.g.: div, span, p). Here’s the list of changes

- Removed urlencode from the library, you must use urlencode when querying since it won’t do it automatically

- Removed setProxy and added something more flexible, that is setCurlArray(array()), check the php.net manual on what to put in the array.

- Added setHighlightFormat() as I explained before this helpful function will aid you with bing.com’s highlight unicode chars (U+E000 and U+E001)

- Another addition is getRequestedQueryURL. This is something I needed most when I was querying the server, this will return you something similar to this: http://api.search.live.net/xml.aspx?AppId=YOUR APP ID&Query=da&Sources=Image&Image.Count=20&Image.Offset=0&Image.Filters=Size:Small&Adult=Moderate&Options=EnableHighlighting

- Now another function is resetHighlight($source), bing.com returns your search with extra characters in the title, this will help you remove them. Optional function.

Download Now | Check Bing API Documentation | Developers API Key

After this post, there is a next one coming in a few hours showing examples of this library and SimpleXML and more.

4 people like this post.

3 Responses to “Bing API PHP v1.1 Release”

  1. Scott says:

    Thank you for writing this!
    What would you say are the major differences between your library and the one over on Codeplex? (bingapiphp.codeplex.com) I know its still early in the process… just curious.

  2. Scott says:

    My apologies… its the same. Perhaps you should consolidate the two locations so as to deter future confusion. Thanks again!

    • David says:

      I’m the one that should be apoligizing, it’s been quite a mess, but yes official bingapiphp.codeplex.com is now the official homepage of the project.

      It’s because, if you have noticed one the timeline of the project there has been a few movements with such a short time.

      I’d hope it helps you deploy your application :)

Leave a Reply