Các bạn vào link sau copy code lưu thành 1 file php nhé
1. Server photos.google.com
Cách sử dụng: Upload code lên host rồi chạy link dạng http://domain.com/photos.php?link=https://photos.google.com/xxxxxxxxxxxxxxxxxx
<?php
error_reporting(E_ERROR | E_PARSE);
// Code đã được edit bởi Chuẩn Cmnr - https://bigmmo.com/ , Download code miễn phí tại bigmmo.com
function curl($url){
$ch = @curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
$head[] = "Connection: keep-alive";
$head[] = "Keep-Alive: 300";
$head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
$head[] = "Accept-Language: en-us,en;q=0.5";
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36');
curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
$page = curl_exec($ch);
curl_close($ch);
return $page;
}
function cut_str($str, $left, $right){
$str = substr(stristr($str, $left) , strlen($left));
$leftLen = strlen(stristr($str, $right));
$leftLen = $leftLen ? -($leftLen) : strlen($str);
$str = substr($str, 0, $leftLen);
return $str;
}
$url = $_GET['link'];
if(isset($url)){
$curTemp = curl($url);
$curTemp = cut_str($curTemp,'{"79468658":[[','"]');
$curTemp = str_replace('\u003d','=', $curTemp);
$curTemp = str_replace('\u0026','&', $curTemp);
$curTemp = urldecode($curTemp);
if ($curTemp <> "") {
$curList = explode("&",$curTemp);
foreach ($curList as $curl) {
$curl = trim(substr($curl, strpos($curl,'https')-strlen($curl)));
if ($curl <> "" ){
if (strpos($curl,'itag=37') || strpos($curl,'=m37') !== false) {$v1080p=$curl;}
if (strpos($curl,'itag=22') || strpos($curl,'=m22') !== false) {$v720p=$curl;}
if (strpos($curl,'itag=18') || strpos($curl,'=m18') !== false) {$v360p=$curl;}
}
}
if($v1080p){
echo '<font color="red">1080p:</font> '.$v1080p.'<br><font color="red">720p:</font> '.$v720p.'<br><font color="red">360p:</font> '.$v360p;
} elseif($v720p){
echo '<font color="red">720p:</font> '.$v720p.'<br><font color="red">360p:</font> '.$v360p;
} else {
echo '<font color="red">360p:</font> '.$v360p;
}
}
}
?>
2. Server drive.google.com
Cách sử dụng: Upload code lên host rồi chạy link dạng http://domain.com/drive.php?link=https://drive.google.com/file/d/xxxxxxxxxxxxxxxxxx/view
<?php
error_reporting(E_ERROR | E_PARSE);
// Code đã được edit bởi Chuẩn Cmnr - https://bigmmo.com/ , Download code miễn phí tại bigmmo.com
function get_curl($obj){
$link = isset($obj['url'])?$obj['url']:NULL;
$useheader = isset($obj['showHeader'])?$obj['showHeader']:NULL;
$useragent = isset($obj['agent'])?$obj['agent']:NULL;
$referer = isset($obj['referer'])?$obj['referer']:NULL;
$custheader = isset($obj['requestHeaders'])?$obj['requestHeaders']:NULL;
$ucookie = isset($obj['cookie'])?$obj['cookie']:NULL;
$encoding = isset($obj['encoding'])?$obj['encoding']:NULL;
$mpostfield = isset($obj['data'])?$obj['data']:NULL;
$sslverify = isset($obj['sslverify'])?$obj['sslverify']:NULL;
$nobody = isset($obj['nobody'])?$obj['nobody']:NULL;
//$ipv6 = isset($obj['ipv6'])?$obj['ipv6']:NULL;
$method = isset($obj['method'])?$obj['method']:NULL;
$usehttpheader = true;
$mpost = false;
if($method=="POST"){
$mpost = true;
}
if(!$useragent || $useragent==""){
$useragent = $_SERVER['HTTP_USER_AGENT'];
}
if($mpostfield){
$arrd = array();
foreach($mpostfield as $key => $value){
$arrd[] = $key."=".$value;
}
$mpostfield = implode("&",$arrd);
}
$curl = curl_init();
$header[0] = "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
$header[] = "Accept-Language: en-us,en;q=0.5";
$header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
$header[] = "Keep-Alive: 115";
$header[] = "Connection: keep-alive";
if($custheader){
foreach($custheader as $key => $value){
$header[] = $key.": ".$value;
}
}
curl_setopt($curl, CURLOPT_URL, $link);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
if($useheader){curl_setopt($curl, CURLOPT_HEADER, 1);}
if($useragent!=""){curl_setopt($curl, CURLOPT_USERAGENT, $useragent);}
if($usehttpheader){curl_setopt($curl, CURLOPT_HTTPHEADER, $header);}
if($ucookie!=""){curl_setopt($curl, CURLOPT_COOKIE, str_replace('\\"','"',$ucookie));}
if($referer!=""){curl_setopt($curl, CURLOPT_REFERER, $referer);}
if($encoding!=""){curl_setopt($curl, CURLOPT_ENCODING, $encoding);}
if($mpost){curl_setopt($curl, CURLOPT_POST, 1);}
if($mpostfield!=""){curl_setopt($curl, CURLOPT_POSTFIELDS, $mpostfield);}
if($nobody){curl_setopt($curl, CURLOPT_NOBODY, 1);}
//if($ipv6){curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);}
if($sslverify){
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
}
$result = curl_exec($curl);
curl_close($curl);
return $result;
}
function get_drive_download($link){
$idd = explode("/file/d/",$link);
$idd = explode("/",$idd[1]);
$idd = $idd[0];
$linkG = "https://docs.google.com/uc?export=download&confirm=no_antivirus&id=".$idd;
$dta = get_curl(array("url"=>$linkG,"sslverify"=>true,"showHeader"=>true));
$ck = NULL;
$confirm = NULL;
try{
$ckc = explode("download_warning_",$dta);
if(!isset($ckc[1])){
throw new Exception();
}
$ckc = explode(";",$ckc[1]);
$ckc = $ckc[0];
$ck = "download_warning_".$ckc;
$confirm = explode("=",$ck);
$confirm = $confirm[1];
$fileExt = explode('class="uc-name-size"',$dta);
$fileExt = explode('href="',$fileExt[1]);
$fileExt = explode('>',$fileExt[1]);
$fileExt = explode('<',$fileExt[1]);
$fileExt = $fileExt[0];
}catch(Exception $e){}
$linkG = str_replace("&confirm=no_antivirus&","&confirm=".$confirm."&",$linkG);
$dta = get_curl(array("url"=>$linkG,"sslverify"=>true,"showHeader"=>true,"cookie"=>$ck));
if(strpos($dta,'ocation:')!==false){
$linkD = explode("Location: ",$dta);
$linkD = explode("e=download",$linkD[1]);
$linkD = $linkD[0].'e=download';
}else{
$linkD = 'Không tìm thấy link, có thể link đã bị limit hoặc del.';
}
return $linkD;
}
$link = $_GET['link'];
echo get_drive_download($link);
3. Server picasaweb.google.com
Cách sử dụng: Upload code link host rồi chạy link dạng http://domain.com/picasa.php?link=Link picasaweb.google.com đã được mã hóa base64.
Tại sao lại phải mã hóa base64 ? Vì link album picasa có dấu # trình duyệt ko đọc được dấu # nên nó chỉ get được video đầu tiên trong album, vì thế ta phải mã hóa link cho mất dấu # đi để nó get đúng video.
Lưu ý: Picasaweb đã đóng cửa và chuyển hướng sang get.google.com nên code trên chỉ hỗ trợ link dạng album, không hỗ trợ link dạng /lh/photo/
<?php
error_reporting(E_ERROR | E_PARSE);
// Code đã được edit bởi Chuẩn Cmnr - https://bigmmo.com/ , Download code miễn phí tại bigmmo.com
function curl($url){
$ch = @curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
$head[] = "Connection: keep-alive";
$head[] = "Keep-Alive: 300";
$head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
$head[] = "Accept-Language: en-us,en;q=0.5";
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36');
curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
$page = curl_exec($ch);
curl_close($ch);
return $page;
}
function cut_str($str, $left, $right){
$str = substr(stristr($str, $left) , strlen($left));
$leftLen = strlen(stristr($str, $right));
$leftLen = $leftLen ? -($leftLen) : strlen($str);
$str = substr($str, 0, $leftLen);
return $str;
}
$url = base64_decode($_GET['link']);
if(isset($url)){
$id_user = cut_str($url,"com/","/");
$id_album = cut_str($url,"=","#");
if($id_album)
$id_album = '&authkey='.$id_album;
$is_aut = explode('#',$url);
$id_ep = $is_aut[1];
$curTemp = curl('https://picasaweb.google.com/data/feed/tiny/user/'.$id_user.'/photoid/'.$id_ep.'?&alt=json'.$id_album);
$curTemp = cut_str($curTemp,'content":[{"','media$description');
if ($curTemp <> "") {
$curList = explode('"',$curTemp);
foreach ($curList as $curl) {
$curl = trim(substr($curl, strpos($curl,'https')-strlen($curl)));
if ($curl <> "" ){
if (strpos($curl,'itag=37') || strpos($curl,'=m37') !== false) {$v1080p=$curl;}
if (strpos($curl,'itag=22') || strpos($curl,'=m22') !== false) {$v720p=$curl;}
if (strpos($curl,'itag=18') || strpos($curl,'=m18') !== false) {$v360p=$curl;}
}
}
if($v1080p){
echo '<font color="red">1080p:</font> '.$v1080p.'<br><font color="red">720p:</font> '.$v720p.'<br><font color="red">360p:</font> '.$v360p;
} elseif($v720p){
echo '<font color="red">720p:</font> '.$v720p.'<br><font color="red">360p:</font> '.$v360p;
} else {
echo '<font color="red">360p:</font> '.$v360p;
}
}
}
?>
Bài viết liên quan:
https://severphim.blogspot.com/2020/05/code-get-link-phim-cac-server-google.html
Nhận Xét Blogger
Không có nhận xét nào. bạn hãy là người đầu tiên.