面向LLM的PHP编程
以下代码有大语言模型生成并经过我修改:
<?php
$imageUrls = [
"https://teachermate.oss-cn-qingdao.aliyuncs.com/ddQi4-1725727523328-censored_cg2_24c.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/c6I45-1725727527032-cg2_02a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/wJueY-1725727529733-cg2_08c.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/RYrHI-1725727532021-cg2_09c.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/i7ICC-1725727535581-cg2_10a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/Wb1cw-1725727539150-cg2_14a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/lWAZQ-1725727545802-cg2_19a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/GfPVv-1725727551195-cg2_25a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/oz1Yl-1725727554017-cg2_26d.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/rBqe7-1725727556858-cg2_sd04a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/Oeh7L-1725727562160-cg2_sd05a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/N8wpy-1725727567035-cg2_sd06a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/wgTZP-1725727570228-cg2_sd06b.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/4gezy-1725727574586-cg2_sd06c.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/BONQe-1725727578068-cgex_01a_l.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/R0eNY-1725727581438-cgex_03a_l.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/tSj0Y-1725727586014-cgex_04a_l.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/h1hHd-1725727590874-cgex_05a_l.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/yyecI-1725727594686-cgex_07a_l.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/2io44-1725727599897-cgex_09a_l.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/tPhSE-1725727603376-cgex_11a_l.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/4cqgH-1725727607219-cgex_12a_l.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/Gg3Gh-1725727611927-cgex_13b_l.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/71SBI-1725727616290-DH3_25c%230000.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/OpsaG-1725727666539-dh3_28D%230000.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/Hx6Mi-1725727673916-dh3_29EM%230000.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/N9uS3-1725727682062-ei3_02K%230000.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/nJKTW-1725727688323-im3_06H%230000.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/Wk7RS-1725727690691-IM3_15h%230000.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/3gbyB-1725727693550-jn3_08K%230000.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/LfxBc-1725727706909-ko3_12K%230000.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/bs9MC-1725727710283-mq3_22L%230000.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/bRQL3-1725727712649-neko4_n01a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/cPm1D-1725727716971-neko4_n02a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/UGkwW-1725727720287-neko4_n03a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/d060m-1725727725534-neko4_n04b.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/CxYPj-1725727728439-neko4_n08a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/EDzoJ-1725727734357-neko4_n09a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/cc3Tb-1725727737073-neko4_n10a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/8rtov-1725727739886-neko4_n11a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/YZn7u-1725727743485-neko4_n13a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/sUWvE-1725727747535-neko4_n13b.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/joGhk-1725727750604-neko4_n14b.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/vGLT8-1725727753787-neko4_n15a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/5KqXF-1725727757941-neko4_n16a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/0zvSA-1725727762004-neko4_n17a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/WcOWs-1725727765060-neko4_n18a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/O2EoW-1725727768151-neko4_n19a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/RlHVq-1725727771157-neko4_n20a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/qmdr0-1725727774157-neko4_n21a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/JRmbS-1725727787328-neko4_n22d.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/aUSGn-1725727792941-neko4_n24a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/McCDm-1725727795385-neko4_n25a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/irGnf-1725727799259-neko4_n33b.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/sZAng-1725727805843-neko4_n34b.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/iwOwR-1725727812998-neko4_n36a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/C4IOQ-1725727816447-neko4_n37a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/KKBOB-1725727820494-neko4_n38a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/ftqRG-1725727824095-neko4_n39a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/DFlm4-1725727829496-neko4_n40a.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/RhojP-1725727833462-UY3_10s%230000.png",
"https://teachermate.oss-cn-qingdao.aliyuncs.com/JNxOJ-1725727836915-UY3_17t%230000.png"
];
$randomIndex = array_rand($imageUrls);
$randomUrl = $imageUrls[$randomIndex];
header('Location: ' . $randomUrl);
exit;
?>
把以上代码丢进一个有php解释器的web服务器就可以用了,有62张图片,都来自猫娘乐园的CG。
但是不知道为什么我博客用我自己写的api首页随机图片都是一样的(
我简单用我博客搭建了一个,需要的话可以调用,不保证稳定性:
https://www.nekopara.uk/pic_api