蓝奏云解析API接口
在线解析蓝奏云文件直链

接口地址: https://api.ooomn.com/api/lanzou

返回格式: json

请求方式: GET,POST

请求示例: https://api.ooomn.com/api/lanzou?type=down&url=https://wwi.lanzouy.com/i5xz4xx0dqf

请求参数说明:

名称 必填 类型 说明
url string 蓝奏云盘链接
pwd string 带密码时需要填写
type string 直接下载(down)

返回参数说明:

名称 类型 说明
name string 文件名称
author string 文件发布者
time string 分享时间
size string 文件大小
download string 下载链接

返回示例:

{
    "code": 200,
    "msg": "success",
    "name": "npp.8.1.9.Installer.exe ",
    "author": "星辰 ",
    "time": "2021-12-23 ",
    "size": " 3.9 M ",
    "url": "https://s51.lanzoug.com:446/031220bb/2021/12/23/86af7c7e5c888b8c54485e6719896174.exe?st=BvCigH5qlENvZthAlIKlRQ&e=1647091391&b=VmpbKwZ2WHNTPlMrA2JQeghkWykASFA4CCgJcFA2VTsJNwhtVCZZcgU1BykBNA_c_c&fi=58695075&pid=122-254-171-130&up=2&mp=0&co=1"
}

请求参数设置:

参数名称 参数值 操作


					{
    "code": 200,
    "msg": "success",
    "name": "npp.8.1.9.Installer.exe ",
    "author": "星辰 ",
    "time": "2021-12-23 ",
    "size": " 3.9 M ",
    "url": "https://s51.lanzoug.com:446/031220bb/2021/12/23/86af7c7e5c888b8c54485e6719896174.exe?st=BvCigH5qlENvZthAlIKlRQ&e=1647091391&b=VmpbKwZ2WHNTPlMrA2JQeghkWykASFA4CCgJcFA2VTsJNwhtVCZZcgU1BykBNA_c_c&fi=58695075&pid=122-254-171-130&up=2&mp=0&co=1"
}				

错误码格式说明:

名称 类型 说明
200 string 解析成功
201 string 链接失效
202 string 密码错误/请输入密码

代码示例:

<?php
$domain = $_GET['url'];
$type = $_GET['type'];
$pwd = $_GET['pwd'];
if ($type == 'down'){
header('Location:https://api.ooomn.com/api/lanzou?type=down&url=' . $domain . '&pwd=' . $pwd);
}else{
header("Content-Type:text/json;charset=UTF-8");
$api = 'https://api.ooomn.com/api/lanzou?url=' . $domain . '&pwd=' . $pwd;
$url = YunTu($api);
echo $url;
}

function YunTu($url)
{
$ch = curl_init();
$timeout = 30;
$ua= $_SERVER['HTTP_USER_AGENT'];
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
$http_type = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://';
$urls = $http_type . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER,$urls);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-FORWARDED-FOR:'.$ip, 'CLIENT-IP:'.$ip));
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
$content = curl_exec($ch);
curl_close($ch);
return $content;
}
?>