1. 程式人生 > >yy6080視訊網站 真實電影地址解析

yy6080視訊網站 真實電影地址解析

<?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);

?>