yy6080视频网站 真实电影地址解析

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhongyuchuan147/article/details/53219863
<?php
$url=isset($_GET['url'])?$_GET['url']:'';
function get_yy6080_video($get_url){
  $u='http://yy6080.org/v/';//接口地址
  $http='';//接口地址
  $url=isset($get_url)?$u.$get_url:'';
  //获取真实地址
  function get_head($sUrl) {
      $oCurl = curl_init();
      $header[] = "Content-type: application/x-www-form-urlencoded";
      $user_agent = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36";
      curl_setopt($oCurl, CURLOPT_URL, $sUrl);
      curl_setopt($oCurl, CURLOPT_HTTPHEADER, $header);
      curl_setopt($oCurl, CURLOPT_HEADER, true);
      curl_setopt($oCurl, CURLOPT_NOBODY, true);
      curl_setopt($oCurl, CURLOPT_USERAGENT, $user_agent);
      curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($oCurl, CURLOPT_POST, false);
      $sContent = curl_exec($oCurl);
      $headerSize = curl_getinfo($oCurl, CURLINFO_HEADER_SIZE);
      $header = substr($sContent, 0, $headerSize);
      curl_close($oCurl);
      $headers=isset(explode('Location:',$header)[1])?explode('Location:',$header)[1]:$header;
      return $headers;
  }


  $content=file_get_contents($url);
  $contents=explode('iframe', $content);

  $contents=explode('"',$contents[1]);
  // var_dump($content);
  // exit;
  $content='http://list.yy6080.org/'.explode('}',$contents[1])[1];

  $url=$content;
  $ch=curl_init();
  curl_setopt($ch,CURLOPT_URL,$url);
  curl_setopt($ch,CURLOPT_HEADER,0);
  curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  $doc=curl_exec($ch);
  curl_close($ch);
  $content=$doc;
  $contents=explode('src=',$content);
  //循环出所有的接口码或者地址 $conts为数组存放所有的接口码
  for($i=1;$i<count($contents);$i++){
    $conts[]=explode('"',$contents[1])[1];
  }
  //判断视频真实地址来源
  for($i=0;$i<count($conts);$i++){
    $ar=explode('}',$conts[$i])[1];
    if($ar==''){exit;}
    $ar=explode('/',$ar);
    if($ar[0]=='sqdy'){$http="http://4138.open.dy6080.com/php/189dy.php?id=";}
    if($ar[0]=='189s'){$http="http://4138.open.dy6080.com/php/189dy.php?id=";}
    if($ar[0]=='189'){$http="http://4138.open.dy6080.com/php/189s.php?name=";}
    if($ar[0]=='ykyun'){$http="http://4138.open.dy6080.com/php/ykyun.php?v=";}
    if($ar[0]=='ykyuns'){$http="http://4138.open.dy6080.com/php/ykyuns.php?v=";}
    if($ar[0]=='sqvip'){$http="http://4138.open.dy6080.com/php/4138.php?v=";}
    if($ar[0]=='iqy'){$http="http://4138.open.dy6080.com/php/iqya.php?v=";}
    if($ar[0]=='iqys'){$http="http://4138.open.dy6080.com/php/iqys.php?v=";}
    if($ar[0]=='sqs'){$http="http://proxy.b1dy.com/";}
    if($ar[0]=='list'){$http="http://4138.open.dy6080.com/";}
    if($ar[0]=='4138'){$http="http://4138.open.dy6080.com/";}
    if($ar[0]=='sq'){$http="http://list.yy6080.org/";}
    if($ar[0]=='proxy'){$http="http://proxy.player.yy6080.org/";}
    $arr[]=$http.$ar[1];
  }
  $url=get_head($arr[0]);
  if(strpos($url,'Server')){$url=explode('Server',$url)[0];}
  return $url;
}


echo get_yy6080_video($url);

?>

猜你喜欢

转载自blog.csdn.net/zhongyuchuan147/article/details/53219863