火山小视频无水印下载php源码

释放双眼,带上耳机,听听看~!

关于火山小视频无水印原谅很简单,下面就分享关于去除火山无水印去除源码

调用方法: echo huoshan(‘https://reflow.huoshan.com/hotsoon/s/yOCZCagw700/ ‘);

<?php
/**
 * 获取火山小视频无水印下载
 * @param string $url 火山小视频分享地址
 * @return json
 * @example 调用方法 例: echo huoshan('https://reflow.huoshan.com/hotsoon/s/yOCZCagw700/ ');
 */
public function huoshan($url)
{
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36');
    $content = curl_exec($ch);
    curl_close($ch);
    $pattern = '/"video_id":"(.*?)"/';
    preg_match($pattern, $content, $matches);
    $data_url = 'http://hotsoon.snssdk.com/hotsoon/item/video/_playback/?video_id='.$matches[1];
    $ch = curl_init($data_url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36');
    curl_exec($ch);
    $newurl = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
    curl_close($ch);
    $data = ['code' => 200, 'msg' => '获取成功!', 'download' => $newurl];
    return json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
}

给TA买糖
共{{data.count}}人
人已赞赏
网站建设

传智播客web前端视频教程 零基础入门精通全栈实战项目网站培训开发课

2020-6-8 2:36:40

网站建设

WordPress后台加载太慢怎么解决

2020-6-21 0:03:48

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索