├── img ├── test (1).jpg ├── test (2).jpg └── test (3).jpg ├── local.php ├── style.css ├── README.md ├── LICENSE ├── random.php ├── img.txt └── index.html /img/test (1).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zichenace/PHP-Random-Pic-API/HEAD/img/test (1).jpg -------------------------------------------------------------------------------- /img/test (2).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zichenace/PHP-Random-Pic-API/HEAD/img/test (2).jpg -------------------------------------------------------------------------------- /img/test (3).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zichenace/PHP-Random-Pic-API/HEAD/img/test (3).jpg -------------------------------------------------------------------------------- /local.php: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2022 梓宸. 3 | * Licensed under MIT (https://github.com/zichenace/PHP-Random-Pic-API/blob/main/LICENSE) 4 | */ 5 | 6 | body { 7 | padding-top:50px 8 | } 9 | .alert { 10 | padding-top:5px; 11 | padding-bottom:5px; 12 | margin-top:10px; 13 | margin-bottom:10px 14 | } 15 | pre { 16 | background-color:rgba(255,255,255,.6) 17 | } 18 | .bgw { 19 | background-color:rgb(255,255,255,.6) 20 | } 21 | .bg { 22 | /*这里使用ZiChen ACG API 可自行修改*/ 23 | background:url(https://app.zichen.zone/api/acg.php) center 0px / cover no-repeat 24 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Random-Pic-API for PHP 2 |  3 |  4 | 5 | 一款简洁小巧基于PHP的随机图片API程序,支持文本链接模式和本地文件模式,小巧好用! 6 | 7 | ## 安装 8 | 9 | 1. [下载](https://github.com/zichenace/PHP-Random-Pic-API/releases/latest) 本程序的发布包 10 | 2. 将文件放入到网站的文件夹中 11 | 3. 访问这个程序是否正常运行 12 | 13 | ## 使用环境 14 | 15 | - 需要 PHP 的支持(建议7.x) 16 | - 由于是轻量级程序,所以对服务器的要求很低,无需占太多空间 17 | 18 | ## 开源协议 19 | 20 | 本项目采用 MIT 开源协议进行授权,并在其基础上须保留原作者的版权注释(PHP、Html 等文件),当然能在页尾加上作者就是最好的啦~ 21 | 22 | 原创不易!如果喜欢本项目,请 `Star` 它以示对我的支持~ 23 | 24 | 支持作者? [赞助我!](https://zichen.zone/donate.html) = ̄ω ̄= 25 | 26 | ## 调用参数 27 | 28 | - return = json:返回标准json数据 29 | - 写法:random.php?return=json 30 | - (默认直接返回图片链接) 31 | 32 | ## 发现了错误 ?! 33 | 34 | 如果出现了问题请发布 [issues](https://github.com/zichenace/PHP-Random-Pic-API/issues) ! 35 | 36 | 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 梓宸 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /random.php: -------------------------------------------------------------------------------- 1 | 57 | -------------------------------------------------------------------------------- /img.txt: -------------------------------------------------------------------------------- 1 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkifq94aj31hc0u0k9t.jpg 2 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkiern0uj31kw0w0e81.jpg 3 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkieueehj33xm2so1kx.jpg 4 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkif2o45j31z4140tum.jpg 5 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkife7f1j31hc0u0e81.jpg 6 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkifnqnbj31hc0u0e81.jpg 7 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkig47vij33uw2kle6u.jpg 8 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkihepxmj31hc0u0b29.jpg 9 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkiglksoj31hc0xcnka.jpg 10 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkigxn0dj31hc0u0b29.jpg 11 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkiibfvlj31hc0u07wh.jpg 12 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkiicpisj31hc0u07wh.jpg 13 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkih2i94j31hc0xckdj.jpg 14 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkihui5rj32801904qp.jpg 15 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkii1uklj31kw0w04qp.jpg 16 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkii6aghj31hc0u04qp.jpg 17 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkiiryh3j33h527bnil.jpg 18 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkiifijmj31hc0u0ncl.jpg 19 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkiin7r3j31kw0w04qp.jpg 20 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkiiqqcrj331a1uo1kx.jpg 21 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkiitw9lj31hc0xc7m0.jpg 22 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkijk973j31hc0u01kx.jpg 23 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkije5qij31hc0u01kx.jpg 24 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkij17okj31hc0u01kx.jpg 25 | https://tvax1.sinaimg.cn/large/008o9gdqly1h4lkijf33qj31hc0u01kx.jpg 26 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |22 | 欢迎使用本程序,开启你的专属随机图片API吧! 23 | 24 | 博客文章(ZiChen.Zone) 25 | 程序介绍(GitHub) 26 | 许可协议(MIT) 27 | 28 | 加入QQ群:120361305 一起讨论交流 29 |30 | 31 |
http(s)://url/random.php33 |
| 参数名 | 默认值 | 描述 |
|---|---|---|
| return | null | 输入为json时将返回标准json文本 |
http(s)://url/local.php41 | 42 |
44 | MIT License 45 | 46 | Copyright (c) 2022 梓宸 47 | 48 | Permission is hereby granted, free of charge, to any person obtaining a copy 49 | of this software and associated documentation files (the "Software"), to deal 50 | in the Software without restriction, including without limitation the rights 51 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 52 | copies of the Software, and to permit persons to whom the Software is 53 | furnished to do so, subject to the following conditions: 54 | 55 | The above copyright notice and this permission notice shall be included in all 56 | copies or substantial portions of the Software. 57 | 58 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 59 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 60 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 61 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 62 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 63 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 64 | SOFTWARE. 65 |66 | 67 | 72 | 73 | 74 | 75 | 76 | --------------------------------------------------------------------------------