api|2022,9,3|更新

更新了广州,上海标准节点图片的链接格式

例子:https://bf-api-1306777571.cos.ap-nanjing.myqcloud.com//img//img_2022-9-3//900224.jpg?
https://bf-api-1306777571.cos.ap-nanjing.myqcloud.com/img/img_{更新的时间}/900224.jpg?

实例化了限制访问的对象,从此开始限制每秒访问次数:

$coun = new CounterDemo();
$coun->grant();  //启动请求限制

优化了id功能:

if($_GET['id']==true and $_GET['id'] != 'TRUE'){//定位输出一条
	$randKey = $_GET['id'];
	$id = $_GET['id'];
} elseif($_GET['id'] == 'TRUE'){  //id=TRUE时请求json接口输出id
	$randKey = rand(0, count($giturlData)+$_GET['c']);
	$id = $randKey;
} else {  //随机获取$giturlData键值,彻底的随机
	$randKey = rand(0, count($giturlData)+$_GET['c']);
	shuffle($giturlData);  //打乱数组,实现更彻底的随机
}

还需修改的:

getimagesize()无法获取图片数据

//BUG示例
//URL:/api-mengbu-teshuchul/hello.php?return=json&id=4800
<br />
<b>Notice</b>:  Undefined index: suo in <b>D:\xampp\htdocs\api-mengbu-teshuchul\hello.php</b> on line <b>34</b><br />
<br />
<b>Notice</b>:  Undefined index: cai in <b>D:\xampp\htdocs\api-mengbu-teshuchul\hello.php</b> on line <b>34</b><br />
<br />
<b>Notice</b>:  Undefined index: gszh in <b>D:\xampp\htdocs\api-mengbu-teshuchul\hello.php</b> on line <b>35</b><br />
<br />
<b>Notice</b>:  Undefined index: zlbh in <b>D:\xampp\htdocs\api-mengbu-teshuchul\hello.php</b> on line <b>35</b><br />
<br />
<b>Notice</b>:  Undefined index: gsmh in <b>D:\xampp\htdocs\api-mengbu-teshuchul\hello.php</b> on line <b>36</b><br />
<br />
<b>Notice</b>:  Undefined index: duibi in <b>D:\xampp\htdocs\api-mengbu-teshuchul\hello.php</b> on line <b>36</b><br />
<br />
<b>Notice</b>:  Undefined index: imgs in <b>D:\xampp\htdocs\api-mengbu-teshuchul\hello.php</b> on line <b>37</b><br />
<br />
<b>Notice</b>:  Undefined index: txts in <b>D:\xampp\htdocs\api-mengbu-teshuchul\hello.php</b> on line <b>37</b><br />
<br />
<b>Warning</b>:  getimagesize(): Unable to find the wrapper &quot;https&quot; - did you forget to enable it when you configured PHP? in <b>D:\xampp\htdocs\api-mengbu-teshuchul\hello.php</b> on line <b>98</b><br />
<br />
<b>Warning</b>:  getimagesize(https://bf-api-1306777571.cos.ap-nanjing.myqcloud.com/img/img_2022-9-3/900224.jpg?): failed to open stream: No such file or directory in <b>D:\xampp\htdocs\api-mengbu-teshuchul\hello.php</b> on line <b>98</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>D:\xampp\htdocs\api-mengbu-teshuchul\hello.php</b> on line <b>99</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>D:\xampp\htdocs\api-mengbu-teshuchul\hello.php</b> on line <b>100</b><br />
{
    "API_name": "QAC_API",
    "imgurl": "https:\/\/bf-api-1306777571.cos.ap-nanjing.myqcloud.com\/img\/img_2022-9-3\/900224.jpg?",
    "width": "",
    "height": ""
}

创建了开源项目:
hengshizhi/php-random-image: php的一个随机图片

{
'title' :'api|2022,9,3|更新',
'Current page link''https://www.df100.ltd/207.asp',
'author''星姮十织',
'copyright': '维度前沿|Dimension Frontier © 2020-2023. 版权所有',
}

评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇