阿里图床API接口源码百分百可用(一手接口源码)

作者:

今天再发一个,阿里图床API源码。和上次美团图床API源码一样,百分百可用。

此接口并非AliExpress那个图床,貌似AliExpress会删图。这个不会很稳了。

这次不会再免费放出来了,有些人是真的狗,直接搬运文章一点版权也不留。

老规矩上传之后的图片例子:

https://img.alicdn.com/imgextra/i1/O1CN01fb6SDs2MRRuKFSJIT_!!2216176529824-0-fleamarket.jpg

[hidecontent type=”payshow”]
<?php

// 前端上传的文件
$file = $_FILES['file'];

// 需要POST提交的数据
$postData = array(
    'file' => new CURLFile($file['tmp_name'], $file['type'], $file['name']),
    'name' => '随便伪装的名.jpg',
    'folderId' => 0,
    'appkey' => 'fleamarket'
);

// API地址
$url = 'https://stream-upload.goofish.com/api/upload.api?_input_charset=utf-8&appkey=fleamarket';

// 初始化CURL
$ch = curl_init();

// 设置CURL参数
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// 设置请求头
$headers = array(
    'Accept: application/json, text/plain, */*',
    'Accept-Encoding: gzip, deflate, br, zstd',
    'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
    'Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryqqAE8SXCf6EseFfE',
    'Cookie: ',//请填写你的闲鱼创作平台CK
    'Origin: https://author.goofish.com',
    'Referer: https://author.goofish.com/',
    'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0',
    'Sec-Ch-Ua: "Microsoft Edge";v="125", "Chromium";v="125", "Not.A/Brand";v="24"',
    'Sec-Ch-Ua-Mobile: ?0',
    'Sec-Ch-Ua-Platform: "Windows"',
    'Sec-Fetch-Dest: empty',
    'Sec-Fetch-Mode: cors',
    'Sec-Fetch-Site: same-site',
    'Priority: u=1, i'
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

// 执行CURL请求并获取返回结果
$response = curl_exec($ch);

// 关闭CURL资源
curl_close($ch);

// 输出上传结果
echo $response;

?>
[/hidecontent]

评论

9 条对“阿里图床API接口源码百分百可用(一手接口源码)”的回复

  1. 12 的头像
    12

    需要cookie吗

    1. 天罚 的头像
      天罚

      需要的[g=chi]

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注