snitcher / bing-api-php
PHP Bing 网络搜索 API 封装器
dev-master
2015-10-30 10:59 UTC
Requires
- php: >=5.3.2
This package is not auto-updated.
Last update: 2024-09-18 09:59:09 UTC
README
原始包(scragg0x/bing-api-php)的修改版本,用于与 Bing 仅网络搜索 API 一起工作,而不是完整搜索。
安装
推荐的方式是通过 composer。只需创建一个 composer.json
文件,然后运行 php composer.phar install
命令即可安装
{
"require": {
"snitcher/bing-api-php": "dev-master"
}
}
API 参考
http://datamarket.azure.com/dataset/bing/search
示例
<?php require_once __DIR__ . "/vendor/autoload.php"; use Bing\Client; // You need to obtain a key $key = ''; $c = new Client($key, 'json'); $res = $c->get('Web', ['Query' => 'Snitcher.com']); $res = json_decode($res, true); print_r($res);