制作一个邻家索菲(隔壁的吸血鬼美眉)的随机图片API

注意!本教程图片来自《隔壁的吸血鬼美眉》官网(http://kyuketsukisan-anime.com)!
由于早上闲着没事,另外也想换个随机图片API了,所以就根据隔壁苦力怕控的汉服随机图片API做了个《隔壁的吸血鬼美眉》的(https://ivampireesp.com/wp-content/random.php

《隔壁的吸血鬼美眉》API预览:
《隔壁的吸血鬼美眉》随机图片API
官网图片链接:http://kyuketsukisan-anime.com/story
为什么要做这个API呢?因为我喜欢
一共有72张图片,但API里只有71张。这是为啥呢?因为我上传时漏了一张:huaji:
不服你来咬我
下面是PHP代码实例,具体少哪个你们看着办,后面我可能会补上。

<?php
$url[1]="https://upload.cc/i1/2019/06/27/3jsp7m.jpg"; 
$url[2]="https://upload.cc/i1/2019/06/27/R6HCJS.jpg"; 
$url[3]="https://upload.cc/i1/2019/06/27/81XIvd.jpg"; 
$url[4]="https://upload.cc/i1/2019/06/27/yW0XrL.jpg"; 
$url[5]="https://upload.cc/i1/2019/06/27/ulyFOH.jpg"; 
$url[6]="https://upload.cc/i1/2019/06/27/wsHLKf.jpg"; 
$url[7]="https://upload.cc/i1/2019/06/27/okc52I.jpg"; 
$url[8]="https://upload.cc/i1/2019/06/27/JdSkh9.jpg"; 
$url[9]="https://upload.cc/i1/2019/06/27/oZflth.jpg"; 
$url[10]="https://upload.cc/i1/2019/06/27/DUot9v.jpg"; 
$url[11]="https://upload.cc/i1/2019/06/27/My3Khz.jpg"; 
$url[12]="https://upload.cc/i1/2019/06/27/uSxljb.jpg"; 
$url[13]="https://upload.cc/i1/2019/06/27/9vkUf7.jpg"; 
$url[14]="https://upload.cc/i1/2019/06/27/pjJwFA.jpg"; 
$url[15]="https://upload.cc/i1/2019/06/27/uHgSGX.jpg"; 
$url[16]="https://upload.cc/i1/2019/06/27/c3iJym.jpg"; 
$url[17]="https://upload.cc/i1/2019/06/27/uRrtHb.jpg"; 
$url[18]="https://upload.cc/i1/2019/06/27/gIlpSm.jpg"; 
$url[19]="https://upload.cc/i1/2019/06/27/qcg8k3.jpg"; 
$url[20]="https://upload.cc/i1/2019/06/27/bXUYfJ.jpg"; 
$url[21]="https://upload.cc/i1/2019/06/27/qYbk2N.jpg"; 
$url[22]="https://upload.cc/i1/2019/06/27/VQpirJ.jpg"; 
$url[23]="https://upload.cc/i1/2019/06/27/LndGzT.jpg"; 
$url[24]="https://upload.cc/i1/2019/06/27/WdOfLK.jpg"; 
$url[25]="https://upload.cc/i1/2019/06/27/JuGb5p.jpg"; 
$url[26]="https://upload.cc/i1/2019/06/27/w0DyiW.jpg"; 
$url[27]="https://upload.cc/i1/2019/06/27/r5LmTD.jpg"; 
$url[28]="https://upload.cc/i1/2019/06/27/MrboSn.jpg"; 
$url[29]="https://upload.cc/i1/2019/06/27/KCujLk.jpg"; 
$url[30]="https://upload.cc/i1/2019/06/27/d5N8o2.jpg"; 
$url[31]="https://upload.cc/i1/2019/06/27/UsJVb9.jpg"; 
$url[32]="https://upload.cc/i1/2019/06/27/pafUYe.jpg"; 
$url[33]="https://upload.cc/i1/2019/06/27/pSLKj6.jpg"; 
$url[34]="https://upload.cc/i1/2019/06/27/9SPUnx.jpg"; 
$url[35]="https://upload.cc/i1/2019/06/27/wcy0nk.jpg"; 
$url[36]="https://upload.cc/i1/2019/06/27/P3z52D.jpg"; 
$url[37]="https://upload.cc/i1/2019/06/27/nsexhH.jpg"; 
$url[38]="https://upload.cc/i1/2019/06/27/LQKfpx.jpg"; 
$url[39]="https://upload.cc/i1/2019/06/27/nICVOW.jpg"; 
$url[40]="https://upload.cc/i1/2019/06/27/lWR3Ot.jpg"; 
$url[41]="https://upload.cc/i1/2019/06/27/v7tmNK.jpg"; 
$url[42]="https://upload.cc/i1/2019/06/27/l7V2w3.jpg"; 
$url[43]="https://upload.cc/i1/2019/06/27/d2TH3C.jpg"; 
$url[44]="https://upload.cc/i1/2019/06/27/f7EO4Q.jpg"; 
$url[45]="https://upload.cc/i1/2019/06/27/keB7WE.jpg"; 
$url[46]="https://upload.cc/i1/2019/06/27/xKpvcf.jpg"; 
$url[47]="https://upload.cc/i1/2019/06/27/vI1zeW.jpg"; 
$url[48]="https://upload.cc/i1/2019/06/27/7VGLgo.jpg"; 
$url[49]="https://upload.cc/i1/2019/06/27/JKG9ZL.jpg"; 
$url[50]="https://upload.cc/i1/2019/06/27/KYPlRj.jpg"; 
$url[51]="https://upload.cc/i1/2019/06/27/gryBOb.jpg"; 
$url[52]="https://upload.cc/i1/2019/06/27/rjoS1O.jpg"; 
$url[53]="https://upload.cc/i1/2019/06/27/PNtdrh.jpg"; 
$url[54]="https://upload.cc/i1/2019/06/27/AzMcQg.jpg"; 
$url[55]="https://upload.cc/i1/2019/06/27/nlEYzH.jpg"; 
$url[56]="https://upload.cc/i1/2019/06/27/V0IKWg.jpg"; 
$url[57]="https://upload.cc/i1/2019/06/27/kECK9r.jpg"; 
$url[58]="https://upload.cc/i1/2019/06/27/tsSPvn.jpg"; 
$url[59]="https://upload.cc/i1/2019/06/27/XhuIor.jpg"; 
$url[60]="https://upload.cc/i1/2019/06/27/Kfc9LA.jpg"; 
$url[61]="https://upload.cc/i1/2019/06/27/wUSs5b.jpg"; 
$url[62]="https://upload.cc/i1/2019/06/27/M4drKN.jpg"; 
$url[63]="https://upload.cc/i1/2019/06/27/ivE8Tw.jpg"; 
$url[64]="https://upload.cc/i1/2019/06/27/20slC1.jpg"; 
$url[65]="https://upload.cc/i1/2019/06/27/Q0X5W6.jpg"; 
$url[66]="https://upload.cc/i1/2019/06/27/jC7NFS.jpg"; 
$url[67]="https://upload.cc/i1/2019/06/27/zqD3nL.jpg"; 
$url[68]="https://upload.cc/i1/2019/06/27/0NkmT9.jpg"; 
$url[69]="https://upload.cc/i1/2019/06/27/sDZTC2.jpg"; 
$url[70]="https://upload.cc/i1/2019/06/27/iFIByM.jpg"; 
$url[71]="https://upload.cc/i1/2019/06/27/4OUlnr.jpg"; 
srand ((double)microtime()*1000000);
$randomnum = rand(0, count($url)-1);
header ("Location: $url[$randomnum]");
?>

接口:http://api.ivampire.firadio.net/gebidexixueguimeimei/index.php
图片压缩包下载:http://api.ivampire.firadio.net/download/隔壁的吸血鬼美眉.zip
HTTPS接口:https://api.loli.rocks/ 后面跟上http接口的路径就行
我想不用解释都应该看得懂代码意思吧
好了教程就这样吧(2019/7/3补回来的,原因:WP被一插件搞坏了)

iVampireSP

喵喵喵~iVampireSP酱~

2 Comments

留下你的评论

*评论支持代码高亮<pre class="prettyprint linenums">代码</pre>

相关推荐