欢迎光临
我们一直在努力

火山小视频无水印下载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);
}
 收藏 (0) 打赏

您可以选择一种方式赞助本站

支付宝扫一扫赞助

微信钱包扫描赞助

未经允许不得转载:114源码 » 火山小视频无水印下载php源码

分享到: 更多 (0)

评论 抢沙发

  • QQ号
  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
切换注册

登录

忘记密码 ?

切换登录

注册