必应壁纸

  • 内容
  • 相关

必应壁纸

参数 必填 类型 说明
format string 返回数据格式,不存在返回xml格式
js (返回json格式,一般使用这个)
xml(返回xml格式)
idx string 请求图片截止天数
0 今天
-1 截止至明天(预准备的)
1 截止至昨天,类推(目前最多获取到16天前的图片)
n string 1-8 返回请求数量,目前最多一次获取8张
mkt string 地区
zh-CN
...

自制接口

  • PHP 示例代码
<?php
$json_string = file_get_contents('https://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=zh-CN');
$data = json_decode($json_string, true);
$url = 'https://cn.bing.com' . $data['images'][0]['url'];
header("Location: {$url}"); 
?>

Bing每日壁纸档案库

Bing官方提供了壁纸获取接口。不过Bing官方提供的API接口只能获取当日及过去7天的历史壁纸,再往前就获取不到了。
接口 说明
https://bing.img.run/uhd_302.php 输出Bing每日壁纸UHD超高清原图。
https://bing.img.run/1920x1080_302.php 输出Bing每日壁纸1080P高清。
https://bing.img.run/1366x768_302.php 输出Bing每日壁纸普清。
https://bing.img.run/m_302.php 输出Bing每日壁纸手机版1080P高清。
https://bing.img.run/rand_uhd.php 随机获取Bing历史壁纸UHD超高清原图。
https://bing.img.run/rand.php 随机获取Bing历史壁纸1080P高清。
https://bing.img.run/rand_1366x768.php 随机获取Bing历史壁纸普清。
https://bing.img.run/rand_m.php 随机获取Bing历史壁纸手机版1080P高清。

本文标签: 必应壁纸

版权声明:若无特殊注明,本文皆为《Dice》原创,转载请保留文章出处。

本文链接:必应壁纸 - https://www.52linglong.com/skill/84.html

发表评论

电子邮件地址不会被公开。 必填项已用*标注