【原创】皮皮虾无水印视频下载,皮皮虾原视频下载,皮皮虾无水印下载源码

个人手机上唯一的短视频软件皮皮虾,下面贴皮皮虾无水印下载源码

<?php

/**
 * 获取皮皮虾无水印视频地址
 * @param string $url 皮皮虾分享地址
 * @return json
 * @example 调用方法 例: echo pipixia('https://h5.pipix.com/s/Uy4Fk4');
 * @author Reaper <a@0oo.ren>
 * @request https://www.52bz.la
 */
public function pipixia($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');
    curl_exec($ch);
    $id_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
    curl_close($ch);
    $pattern = '/\/item\/(.*?)\?app_id/';
    preg_match($pattern, $id_url, $matches);
    $url_data = json_decode(file_get_contents('http://h5.pipix.com/bds/webapi/item/detail/?item_id=' . $matches[1]), 1);
    $newurl = $url_data["data"]['item']['origin_video_download']["url_list"][0]['url'];
    $data = ['code' => 200, 'msg' => '获取成功!', 'download' => $newurl];
    return json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
}

原创文章(代码),来之不易,转载请注明原著!

Last modification:August 16th, 2019 at 11:22 am
如果觉得我的文章对你有用,请随意赞赏

Leave a Comment