必应壁纸 API

AlexSJC
发布于 2023-04-04 / 8 阅读
1
0

必应壁纸 API

官方 API:https://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=zh-CN

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


评论