Juno_okyo

Get_All_Decoded.php

Feb 26th, 2016
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.31 KB | None | 0 0
  1. <?php
  2. /* Decoded by Juno_okyo */
  3. header('Content-Type: text/html; charset=utf-8');
  4. setlocale(LC_TIME, 'vn_VN');
  5. date_default_timezone_set('Asia/Ho_Chi_Minh');
  6.  
  7. function Curl($Url) {
  8.     $ch = @curl_init();
  9.     curl_setopt($ch, CURLOPT_URL, $Url);
  10.     $head[] = "Connection:Keep-Alive";
  11.     $head[] = "Content-Type:text/html; charset=utf-8";
  12.     $head[] = "Keep-Alive:timeout=5, max=100";
  13.     $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
  14.     $head[] = "Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3";
  15.     $head[] = "X-Powered-By:Jkey C Phong";
  16.     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');
  17.     curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
  18.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  19.     curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
  20.     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  21.     curl_setopt($ch, CURLOPT_TIMEOUT, 60);
  22.     curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
  23.     curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
  24.     $page = curl_exec($ch);
  25.     curl_close($ch);
  26.     return $page;
  27. }
  28. If (isset($_GET['client'], $_GET['id'], $_GET['url'])) {
  29.     If ($_GET['client'] == 'Jc7xz2dFjvkvFQzGphmr' AND $_GET['url'] != '') {
  30.         If ($_GET['id'] == 1) {
  31.             $mat = preg_match('#nhaccuatui.com/bai-hat/.+\.(.*?)\.html#', $_GET['url'], $Link);
  32.             If ($mat == false) {
  33.                 Echo json_encode(Array('Message' => '&#272;&#432;&#7901;ng d&#7851;n kh&#244;ng &#273;&#250;ng', 'CopyRight' => 'Jkey C Phong'));
  34.                 Return False;
  35.             }
  36.             // 128kbps
  37.             $url_128kbps = 'http://www.nhaccuatui.com/download/song/' . $Link[1] . '_128';
  38.             $src_128kbps = curl($url_128kbps);
  39.             $decode_128kbps = json_decode($src_128kbps);
  40.             //
  41.             // 320kbps
  42.             $url_320kbps = 'http://www.nhaccuatui.com/download/song/' . $Link[1];
  43.             $src_320kbps = curl($url_320kbps);
  44.             $decode_320kbps = json_decode($src_320kbps, true);
  45.             //
  46.             Echo json_encode(Array('Message' => 'Success', 'ID Server' => '1', 'Server' => 'NhacCuaTui', 'Download_Url' => Array('128' => $decode_320kbps['data']['stream_url'], '320' => $decode_320kbps['data']['stream_url']), 'Status_Read_Mode' => 'True'));
  47.         } ElseIf ($_GET['id'] == 2) {
  48.             $key = 'fafd463e2131914934b73310aa34a23f';
  49.             $mat = preg_match('#mp3.zing.vn/(bai-hat|video-clip)/.+/(.*)\.html#', $_GET['url'], $Link);
  50.             If ($mat == false) {
  51.                 Echo json_encode(Array('Message' => '&#272;&#432;&#7901;ng d&#7851;n kh&#244;ng &#273;&#250;ng', 'CopyRight' => 'Jkey C Phong'));
  52.                 Return False;
  53.             }
  54.             If ($Link[1] == 'bai-hat') {
  55.                 $Url = 'http://api.mp3.zing.vn/api/mobile/song/getsonginfo?keycode=' . $key . '&requestdata={"id":"' . $Link[2] . '"}';
  56.                 $Src = curl($Url);
  57.                 $Jsd = Json_Decode($Src, True);
  58.                 Echo json_encode(Array('Message' => 'Success', 'ID Server' => '2', 'Server' => 'Zing Mp3', 'Download_Url' => $Jsd['link_download']));
  59.             } ElseIf ($Link[1] == 'video-clip') {
  60.                 $Url = 'http://api.mp3.zing.vn/api/mobile/video/getvideoinfo?keycode=' . $key . '&requestdata={"id":"' . $Link[2] . '"}';
  61.                 $Src = curl($Url);
  62.                 $Jsd = Json_Decode($Src, True);
  63.                 Echo Json_encode(Array('Message' => 'Success', 'ID Server' => '2', 'Server' => 'Zing Mp3', 'Download_Url' => $Jsd['source'], 'Status_Read_Mode' => 'True'));
  64.             } else {
  65.                 echo "false";
  66.             }
  67.         } ElseIf ($_GET['id'] == 3) {
  68.             $mat = preg_match('#tv.zing.vn/video/.+/(.*)\.html#', $_GET['url'], $Link);
  69.             if ($mat == false) {
  70.                 Echo json_encode(Array('Message' => '&#272;&#432;&#7901;ng d&#7851;n kh&#244;ng &#273;&#250;ng', 'CopyRight' => 'Jkey C Phong'));
  71.                 Return False;
  72.             }
  73.             $src = curl('http://getlinkfs.com/getfile/zingtv.php?link=' . $_GET['url']);
  74.             preg_match_all('#href="(.*?)&device=other"#', $src, $url_t);
  75.             Echo Json_encode(Array('Message' => 'Success', 'ID Server' => '3', 'Server' => 'Zing TV', 'Download_Url' => $url_t[1], 'Status_Read_Mode' => 'True'));
  76.         } ElseIf ($_GET['id'] == 4) {
  77.             $mat = preg_match('#nhacso.net/nghe-nhac/.+\.(.+)==\.html#', $_GET['url'], $Link);
  78.             If ($mat == False) {
  79.                 Echo json_encode(Array('Message' => '&#272;&#432;&#7901;ng d&#7851;n kh&#244;ng &#273;&#250;ng', 'CopyRight' => 'Jkey C Phong'));
  80.                 Return False;
  81.             }
  82.             Echo Json_encode(Array('Message' => 'Success', 'ID Server' => '4', 'Server' => 'NhacSo', 'Download_Url' => 'http://nhacso.net/songs/download-song?songId=' . $Link[1], 'Status_Read_Mode' => 'True'));
  83.         } Else {
  84.             Echo "Flase";
  85.         }
  86.     } Else {
  87.         echo json_encode(Array('Message:' => 'M&#227; client kh&#244;ng &#273;&#250;ng ho&#7863;c &#273;&#432;&#7901;ng d&#7851;n ch&#432;a &#273;&#432;&#7907;c nh&#7853;p', 'CopyRight:' => 'Jkey C Phong'));
  88.     }
  89. } Else {
  90.     echo json_encode(Array('Message:' => 'Kh&#244;ng t&#236;m th&#7845;y li&#234;n k&#7871;t', 'CopyRight:' => 'Jkey C Phong'));
  91. }
Add Comment
Please, Sign In to add comment