阿里图床复活
function submit($file_path){
$url = 'https://kfupload.alibaba.com/kupload';
$data = [];
$data['scene'] = 'aeMessageCenterV2ImageRule';
$data['name'] = 'player.png';
$data['file'] = new CURLFile(realpath($file_path));
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 120);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
$hothead[] = "Accept:application/json";
$hothead[] = "Accept-Encoding:gzip,deflate,sdch";
$hothead[] = "Accept-Language:zh-CN,zh;q=0.8";
$hothead[] = "Connection:close";
$ip = mt_rand(48, 140) . "." . mt_rand(10, 240) . "." . mt_rand(10, 240) . "." . mt_rand(10, 240);
$hothead[] = 'CLIENT-IP:' . $ip;
$hothead[] = 'X-FORWARDED-FOR:' . $ip;
curl_setopt($ch, CURLOPT_HTTPHEADER, $hothead);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_USERAGENT, 'Dalvik/2.1.0 (Linux; U; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012)');
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$html = @curl_exec($ch);
curl_close($ch);
$json = @json_decode($html, true);
if ($json['code'] == '0') {
@unlink($file_path);
$file_path = $json['url'];
}
return $file_path;
}
ua必须这个 请问这个源码放在哪里呢?试过cd的workers提示错误呢,大佬指导一下https://cdn.jsdelivr.net/gh/master-of-forums/master-of-forums/public/images/patch.gif 我记得有个阿里图床的源码 挺简洁的 Qimiao 发表于 2022-3-28 00:53
我记得有个阿里图床的源码 挺简洁的
https://hostloc.wiki/thread-997952-1-1.html xsap 发表于 2022-4-9 12:09
https://hostloc.wiki/thread-997952-1-1.html
来晚了已经被傻逼资源站和谐 请问该怎么用呢? mark zhongziso 发表于 2022-7-22 07:45
mark
:o bd
页:
[1]