接口地址

https://api.vvhan.com/api/bing

返回格式

IMG

请求方式:

GET

请求示例(可选尺寸):

https://api.vvhan.com/api/bing?size=640x480

请求示例(图片输出):

https://api.vvhan.com/api/bing

请求示例(图片随机):

https://api.vvhan.com/api/bing?rand=sj

请求示例(JSON输出):

https://api.vvhan.com/api/bing?type=json

请求示例(JSON随机):

https://api.vvhan.com/api/bing?type=json&rand=sj

参数说明

名称 必填 类型 说明
type string JSON输出:json
rand string 随机输出:sj
size string 图片尺寸:1920x1200, 1920x1080, 1366x768, 1280x768, 1024x768, 800x600, 800x480, 768x1280, 720x1280, 640x480, 480x800, 400x240, 320x240, 240x320

返回数据

返回Bing每日一图

调用实例

<img src="https://api.vvhan.com/api/bing" alt="韩小韩API">

示例代码

<?php
$result = file_get_contents("https://api.vvhan.com/api/bing"); header("Location:" . $result);
?>