Bing API PHP Library - 简单Bing API的PHP库

这是一个简单的php库文件,可以方便的在php中调用Bing API实现一些功能,具体可以去作者项目站上查询。

  // Include the Bing API PHP Library

require_once 'library/BingAPI.php';

// Simply start the class with your AppID argumented

$search = new BingAPI('YOUR APPID KEY');

/* To use multiple resources simply do

->setSources('Web+Image') ,

it must match the source type bing.com provides */

// Build your query easily

$search->query('gimp')

->setSources('Web')

->setFormat('xml')

# Also you can try: xml, soap or json

->setOptions(

array(

'Web.Count' => '10',

'Web.Offset' => '0',

'Adult' => 'Moderate',

'Options' => 'EnableHighlighting')

);

# Check the API documentation in bing.com for more information

# This will give you a raw output

echo $search->getResults();

项目网站:http://bingapiphp.codeplex.com/

下载:bingapiphp-1.1.zip(Bing API PHP库)

下载:bingmoccha.zip(演示代码)

评论

Popular Posts

常用的国内外延迟测速链接(generate_204)

流浪猫鲍勃 A Street Cat Named Bob (2016)

女生可以对男朋友心机到什么程度?(苦)

网站建设公司不挣钱的原因

《不可思议》 金莎

随身WiFi折腾指南: 解锁、刷机与DIY

WordPress搬家步骤

《红领巾侠》国产优秀动画短片

Postman 5.5.3 - API接口调试工具

如何做一名成功的IT工程师?