更新于
2025年9月30日
更新说明
-
2025-09-30
本次更新新增了直接访问有随机换图、切换淡化+缩放的效果。同时允许被直接图片引入到WP博客的封面、背景中
API介绍
作为一名《Lycoris Recoil》的粉丝,同时也是最爱磕GL的人类,白木专门尝试写了一个相应的API图片服务,完美适配「LoliMeow主题」和「WordPress」平台😎
我提供的API链接将为持续提供海量的《Lycoris Recoil》相关图片,白木会持续更新!💕
如果你也热爱《Lycoris Recoil》,白木愿意和你一起分享这份热爱吧!😍
现成API分享
https://mu.baimu.live/
https://mu.baimu.live/LycorisRecoil/fm/
代码说明
$ext = ‘jpg’;
,根据自己的图片扩展名后缀,修改命名为
jpg
的地方
目前支持三种格式,分别为▶️
jpg
▶️
wbep
▶️
png
$baseURL = ‘https://mu.baimu.live/LycorisRecoil/’; ,,根据自己的域名和图片路径,修改命名为 https://mu.baimu.live/LycorisRecoil/ 的地方
务必记住图片格式,这是最重要的事情
在
$images[] = $baseURL . ‘Lycoris_Recoil-‘ . $i . ‘.’ . $ext;
中的
Lycoris_Recoil-
属于图片命名格式
推荐命名格式:
名称
(26英文字母) ➕
–
(连接符号)➕
序号
(如01~99)
<?php /* ---------- 图片扩展名配置项 ---------- */ $ext = 'jpg'; // 请根据自身图片格式,修改 jpg // 记得根据自己的图片后缀名修改,目前白木在这里只适配了三种格式🔽 // ▶️ jpg ▶️ wbep ▶️ png /* ---------- 图片路径配置项 ---------- */ $baseURL = 'https://mu.baimu.live/LycorisRecoil/'; // 请记得修改为自己的域名+路径 // 🔼 这是一个存放图片的文件夹路径 $images = []; for ($i = 1; $i <= 26; $i++) { // 请记得修改你的图片命名格式 // 推荐命名格式:名称(26英文字母) ➕ -(连接符号)➕ 序号(如01~99) $images[] = $baseURL . 'Lycoris_Recoil-' . $i . '.' . $ext; // 这里的【 Lycoris_Recoil- 】是图片命名格式 // 我的图片命名格式🔽 // Lycoris_Recoil-01 // ... 省略超多图片... // Lycoris_Recoil-39 } $coverImage = $images[array_rand($images)]; $isReferrer = isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] !== ''; if ($isReferrer) { header('Content-Type: image/' . ($ext === 'jpg' ? 'jpeg' : $ext)); header('Cache-Control: no-cache'); readfile($coverImage); exit; } $startIndex = array_rand($images); $imagesJson = json_encode($images, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); echo <<<HTML <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <!--这里是直接访问/分享链接时的站点名称--> <!--留空,则直接显示域名--> <title>Lycoris Recoil 随机轮播</title> <meta property="og:image" content="$coverImage" /> <style> html,body{margin:0;padding:0;width:100%;height:100%;overflow:hidden;background:#000} #slideshow img{position:fixed;top:0;left:0;width:100%;height:100%;object-fit:cover;opacity:0;transform:scale(1.1);transition:opacity 1.5s ease,transform 3s ease;z-index:0} #slideshow img.active{opacity:1;transform:scale(1);z-index:1} </style> </head> <body> <div id="slideshow"></div> <script> const container=document.getElementById('slideshow'),images=$imagesJson; let currentIndex=$startIndex; const img1=new Image(),img2=new Image(); container.appendChild(img1);container.appendChild(img2); let showingFirst=true; img1.src=images[currentIndex];img1.classList.add('active'); function showNextImage(){ let nextIndex; do{nextIndex=Math.floor(Math.random()*images.length)}while(nextIndex===currentIndex); const nextImg=showingFirst?img2:img1,currentImg=showingFirst?img1:img2; nextImg.src=images[nextIndex]; requestAnimationFrame(()=>{nextImg.classList.add('active');currentImg.classList.remove('active')}); currentIndex=nextIndex;showingFirst=!showingFirst; } setInterval(showNextImage,3000); </script> </body> </html> HTML; ?>
- Lycoris_Recoil-01
- Lycoris_Recoil-02
- Lycoris_Recoil-03
- Lycoris_Recoil-04
- Lycoris_Recoil-05
- Lycoris_Recoil-06
- Lycoris_Recoil-07
- Lycoris_Recoil-08
- Lycoris_Recoil-09
- Lycoris_Recoil-10
- Lycoris_Recoil-11
- Lycoris_Recoil-12
- Lycoris_Recoil-13
- Lycoris_Recoil-14
- Lycoris_Recoil-15
- Lycoris_Recoil-16
- Lycoris_Recoil-17
- Lycoris_Recoil-18
- Lycoris_Recoil-19
- Lycoris_Recoil-20
- Lycoris_Recoil-21
- Lycoris_Recoil-22
- Lycoris_Recoil-23
- Lycoris_Recoil-24
- Lycoris_Recoil-25
- Lycoris_Recoil-26
白木_ShiRoKi
- 商务微信:Misaka1662
- 添加请备注「来意」,否则不会通过哟~😝
- 商务邮箱:Misaka273@outlook.com
- 「半碗残星~呜呜呜~再来!我还能…」
赞美/嘲讽⚠️已关闭
赞美/嘲讽已关闭