|
½ÓÏÂÀ´¸ø´ó¼ÒÐãÒ»²¨¼òµ¥µÄ²Ù×÷£¬±íʾÎÒ»¹´æÔÚ¡£GiaoÒÔÏ´úÂ룬¾«¼òÒ×ѧ£¬Ò׶®¡£giaoÎÒÀïgiaogiao
·µ»ØÊý¾Ý
{
"code": 200,
"msg": "³É¹¦",
"name": "Ö¹ÓÚÑÔÇé",
"title": "ÓжÔÏóÁ˸㻥ɾÕæû±ØÒª Äãµ¥ÉíµÄʱºòÎÒ¶¼¿´²»ÉÏÄã ÄãÓжÔÏóÁËÎÒ»¹ÄܲðÉ¢Ä㣿",
"pic": "https:\/\/p9-ppx.byteimg.com\/img\/mosaic-legacy\/3388d000ba23c8524640d~1125x637_q80.jpeg",
"url": "http:\/\/v3-ppx.ixigua.com\/0eb63fe514f3c503a47530c41c50b968\/5f3d6c68\/video\/m\/2204f179597aab34bcdae3bfd30458edcf611668c6c8000055ca67c1f631\/?a=1319&br=3375&bt=1125&cr=0&cs=0&dr=3&ds=3&er=&l=202008200115590100140431491F0C1D94&lr=&mime_type=video_mp4&qs=0&rc=am1zbzhtdW83djMzNWYzM0ApNDU1aWZlaW**(ÆÁ±Î´ÊÇëÎðÐÞ¸ÄÈƹý,½ûÖ¹·¢²¼,·ñÔò¿ÉÄܱ»É¾Ìû»ò½ûÑÔ)zY4ODU1Z2dlZ2MvYjQwM2RfLS0tMS9zczVgLjBeNmMvMF4vNjIyLjM6Yw%3D%3D&vl=&vr="
}
¸´ÖÆ´úÂë
ÍêÕû´úÂë
<?php
//À¶ÓÅ
header("Access-Control-Allow-Origin:*");
header('Content-type: application/json');
!empty($_REQUEST['url']) ? $url = $_REQUEST['url'] : exit(json_encode(['code'=>202, "msg"=>"ȱʧ²ÎÊý"],JSON_UNESCAPED_UNICODE));
$api = file_get_contents('https://h5.pipix.com/bds/webapi/item/detail/?item_id='.id($url).'&source=share');
$data = json_decode($api,true);
if($data){
$value = array('code'=>200,'msg'=>'³É¹¦','name'=>$data['data']['item']['author']['name'],'title'=>$data['data']['item']['content'],'pic'=>$data['data']['item']['origin_video_download']['cover_image']['url_list'][0]['url'],'url'=>$data['data']['item']['origin_video_download']['url_list'][0]['url']);
}else{
$value = array('code'=>202,'msg'=>'»ñȡʧ°Ü');
}
echo json_encode($value,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);
function id($url){ //»ñÈ¡ÕæʵµØÖ·²¢½ØÈ¡ID
$api = get_headers($url,1);
$pid = explode("/item/",$api['location']);
$id = explode("?app_id",$pid[1]);
return $id[0];
}
¸´ÖÆ´úÂë
|
|