最新抖音去水印API接口PHP源码,本地解析

最新可用抖音短视频解析去水印API接口源码

示例接口:http://li78m.cn/api/douyin.php?url=https://v.douyin.com/JVep1JF/

一般调用为:域名/douyin.php?url=

返回内容为:

{ 
"title": "听说你们想看旗袍?", 
"cover": "https://p9-dy.byteimg.com/tos-cn-p-0015/a0cb4491b5fd47529db390e98667c575_1606982130~tplv-dy-360p.jpeg?from=2563711402", 
"url": "http://v26.douyinvod.com/1004ae13a01233a8717d5d6d9f33246e/5fd439af/video/tos/cn/tos-cn-ve-15/29bb7a166a2745dc8201dc0959257244/?a=1128&br=3165&bt=1055&cd=0%7C0%7C0&cr=0&cs=0&cv=1&dr=0&ds=3&er=&l=202012121031520101980231003314B0C1&lr=&mime_type=video_mp4&qs=0&rc=andvNml0dWo8eTMzNWkzM0ApZ2Y8OzM4ZmU8NzZlODozOGdeNmRgMnMyYzFfLS01LS9zczMxXzBjMy8wM14vYS9eNTY6Yw%3D%3D&vl=&vr=" }

[mm key=”ufo888″]

<?p
hp
$url = @$_GET['url'];
if ($url != null) {
$loc = get_headers($url, true)["location"];
$b = 'video/';
$c = '/?region';
$id = GetBetween($loc,$b,$c);

$arr = json_decode(curl('https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids='.$id), true);
//var_dump($arr);
preg_match('/href="(.*?)">Found/', curl(str_replace('playwm', 'play', $arr['item_list'][0]["video"]["play_addr"]["url_list"][0])), $matches);
$videourl = str_replace('&', '&', $matches[1]);
$Json = array(
    'title' => $arr['item_list'][0]["share_info"]["share_title"],
    'cover' => $arr['item_list'][0]['video']["origin_cover"]["url_list"][0],
    'url' => $videourl, 
);
$Json = json_encode($Json,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);
echo stripslashes($Json);
return $Json;
}
else{
echo '请输入抖音分享的地址,如:https://v.douyin.com/m2mun2';
}
function GetBetween($content,$start,$end) {
    $r = explode($start, $content);
    if (isset($r[1])) {
    $r = explode($end, $r[1]);
    return $r[0];
    }
    return '';
}
function curl($url)
{
    $Header=array( "User-Agent:Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1");
    $con=curl_init((string)$url);
    curl_setopt($con,CURLOPT_HEADER,False);
    curl_setopt($con,CURLOPT_SSL_VERIFYPEER,False);
    curl_setopt($con,CURLOPT_RETURNTRANSFER,true);
    curl_setopt($con,CURLOPT_HTTPHEADER,$Header);
    curl_setopt($con,CURLOPT_TIMEOUT,5000);
    $result = curl_exec($con);
    return $result;
}
?>

[/mm]

图片[1]-最新抖音去水印API接口PHP源码,本地解析-UFO源码站

最新抖音去水印API接口PHP源码,本地解析-UFO源码站
最新抖音去水印API接口PHP源码,本地解析
此内容为付费阅读,请付费后查看
330
您当前未登录!建议登陆后购买,可保存购买订单
付费阅读
© 版权声明
THE END
喜欢就支持以下吧
点赞0赞赏
分享
相关推荐
评论 抢沙发

请登录后发表评论