授权商查询是否授权代码
https://s1.ax1x.com/2020/10/09/0rYvRK.jpg在本地加密查询然后采集过来
{我这个是彩虹ds查询的,可以根据自己的改下,类似的授权查询网站的授权商也可以用}
[*]<form action="/" method="post" >
<input type="text" name="ym" placeholder="">
<button type="submit" class="site-btn">查询</button>
</form>
</div>
<p style="text-align: center;">请勿输入http</p>
<?php if (isset($_POST['ym'])) {
$cany = $_POST['ym'];
$cc=base64_encode($cany);
//header("Location:https://ds.cccyun.cc/?u=$cc");
$url="https://ds.cccyun.cc/?u='.$cc.'";
$con=file_get_contents("compress.zlib://".$url);
$preg='#<img src="(.*)">#isU';
preg_match_all($preg,$con,$res);
//var_dump($res);exit;
//for循环遍历数组
for($i = 1; $i < count($res); $i++) {
for($j = 0; $j < count($res[$i]); $j++) {
$imgjg='<img src="https://ds.cccyun.cc/'.$res[$i][$j].'">';
}
}
if ($imgjg=='<img src="https://ds.cccyun.cc/assets/ico_success.png">') {
echo $imgjg."正版授权";
} else {
echo $imgjg."没有授权";
}
} ?>
复制代码
把 ym 塞进 base64 再甩给 ds 那边查,说穿了就是拿人家的接口当后台使。注释掉的那行 header 还留着,能看出本来的想法是让前端直接跳过去,后来改成后端拉回来,这一步换得挺机灵。可借来的查询入口最经不起对方改版:哪天人家参数字段一换,base64 编出来的串直接对不上号,页面照样转圈,还转得挺认真。表单底下那句请勿输入 http,八成是被用户喂出来的经验,我见过有人连协议带路径整条网址黏进去的。真想长期跑,盯对方接口的变动比盯这几行代码管用多了,不然某天查出来一片空,还得回头怀疑是不是编码写错了。
{:5_252:}
页:
[1]