获取鲁大师随机壁纸接口,可自定义搜索,搜出的东西比如皮皮赖
,只会出现关于皮皮赖
的壁纸 具体自行测试 下面贴代码
/**
* 获取鲁大师壁纸
* @author Reaper <a@0oo.ren>
* @request https://www.52bz.la
* @param string $data 关键词
* @return string
*/
public function ludashi_bizhi($data)
{
$link = file_get_contents('https://bizhi.ludashi.com/live/wallpaper/searchList?keyword='.$data.'&pageno=1&count=999&_='.md5(rand(1111,9999).'https://www.52bz.la'.time()));
$json = json_decode($link,1);
if ($json['data']['total_count'] > 0) {
return $json["data"]["list"][rand(0,count($json["data"]["list"])-1)]["image"];
}
return json_encode(['code'=>404,'msg'=>'图片丢失'],JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
}