皮皮虾去水印接口源码

作者: 凡酷官方 VIP 180百度已收录

喜欢的可以自己拿去研究一下

$arr = parse_url($url);


            $itemid=$arr['path'];


            $arr1=explode("/",$itemid);


            $item=$arr1['2'];


            $url='https://h5.hulushequ.cn/bds/webapi/item/detail/?item_id='.$item;


            $curl = curl_init();


            curl_setopt($curl, CURLOPT_URL, $url);


            curl_setopt($curl, CURLOPT_HEADER, 0);


            curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);


            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);//这个是重点。


            $data = curl_exec($curl);


            curl_close($curl);


                $res=json_decode($data,true);


                $title=$res['data']['item']['video']['text'];//标题


            $video=$res['data']['item']['video']['video_low']['url_list'][0]['url'];//视频


            $img=$res['data']['item']['video']['video_download']['cover_image']['url_list'][0]['url'];//略缩图


            $str = array(


                        "code" => "101",


                        "msg"  => "获取成功",


                        "data" => array(


                                        "title"                =>$title,


                                        "videourl"        =>$video,


                                        "img"                =>$img,


                                )


                        );


                $str = json_encode($str); 


            return $str;

 


凡酷网 (fankuw.cn) - 综合性资源分享平台网站 » 皮皮虾去水印接口源码

发表评论

1

Title - Artist
0:00
    隐藏