যারা rapidleech ব্যাবহার করেন তারা নিশ্চয় জানেন যে, কিছুদিন যাবত youtube এ ভিডিও transload করা যাচ্ছে না, এখন এ সমস্যার সমধান করুন মাত্র ২ মিনিটে। প্রথমে FTP বা cPanel দিয়ে rapidleech তে ঢুকুন তারপর "hosts" directory তে ঢুকুন তারপর "download" directory তারপর "youtube_com.php" টা এডিট করুন এবং পূর্বের script মুছে ফেলুন ও নিচের script গুলো paste করুন। ব্যাস! complete।
/rapidleech/hosts/download/youtube_com.php
এখন সেভ দিয়ে বেরিয়ে আসুন তারপর সার্ভার এ ভিডিও ডাউনলোড করার চেষ্টা করুনঃ
এখান থেকে ডাউনলোড করে নোটপ্যাড এ ওপেন করে নিন অথবা নিচের কোড থেকে নিনঃ
OR
<?php cookie = isset($_REQUEST['yt_QS']) && !empty($_POST['cookie']) ? StrToCookies(decrypt(urldecode($_POST['cookie']))) : array(); $this->page = $this->GetPage($link, $this->cookie); if (preg_match('@^HTTP/1\.[01] 403 Forbidden@i', $this->page)) { $this->CheckErrors(); html_error('403 Forbidden'); } else if (preg_match('@^HTTP/1\.[01] 404 Not Found@i', $this->page)) { $this->CheckErrors(); html_error('404 Page Not Found'); } else $this->CheckErrors(); if (isset($_REQUEST['step']) || preg_match('@Location: https?://(www\.)?youtube\.com/das_captcha@i', $this->page)) { $this->captcha($link); } $Mesg = lang(300); if (preg_match('#Location: https?://(www\.)?youtube\.com/verify_age#i', $this->page)) { $Mesg .= ' Verify_age page found: This video may contain content that is inappropriate for some users Logging in to Youtube... Direct Link option may not work.'; $this->changeMesg($Mesg); $this->verify_age($link); } if (preg_match('#Location: https?://(www\.)?youtube\.com/verify_controversy#i', $this->page)) { $Mesg .= ' Verify_controversy page found: The following content has been identified by the YouTube community as being potentially offensive or inappropriate. Viewer discretion is advised.'; $this->changeMesg($Mesg); $this->verify_controversy($link); } if (!preg_match('#fmt_stream_map=(.+?)(&|(\\\u0026))#', $this->page, $fmt_url_map)) html_error('Video link not found.'); $fmt_url_maps = explode(',', urldecode($fmt_url_map[1])); $this->fmts = array(38,37,22,45,35,44,34,43,18,5,17); $yt_fmt = empty($_REQUEST['yt_fmt']) ? '' : $_REQUEST['yt_fmt']; $this->fmturlmaps = $this->GetVideosArr($fmt_url_maps); if (empty($yt_fmt) && !isset($_GET["audl"])) return $this->QSelector($link); elseif (isset($_REQUEST['ytube_mp4']) && $_REQUEST['ytube_mp4'] == 'on' && !empty($yt_fmt)) { //look for and download the highest quality we can find? if ($yt_fmt == 'highest') { foreach ($this->fmts as $fmt) { if (array_key_exists($fmt, $this->fmturlmaps)) { $furl = $this->fmturlmaps[$fmt]; break; } } } else { //get the format the user specified (making sure it actually exists) if (!$furl = $this->fmturlmaps[$yt_fmt]) html_error ('Specified video format not found'); $fmt = $yt_fmt; } } else { //just get the one Youtube plays by default (in some cases it could also be the highest quality format) $fmt = key($this->fmturlmaps); $furl = $this->fmturlmaps[$fmt]; } $ext = '.flv'; $fmtexts = array('.3gp' => array(17), '.mp4' => array(18,22,37,38), '.webm' => array(43,44,45)); foreach ($fmtexts as $k => $v) { if (!is_array($v)) $v = array($v); if (in_array($fmt, $v)) { $ext = $k; break; } } $_s = '[\r\n\t\s]'; if (!preg_match("#$_s*(.*)$_s+-$_s+YouTube$_s*#Us", $this->page, $title) && !preg_match("#$_s*YouTube\s+-\s+(.*)$_s*#Us", $this->page, $title)) html_error('No video title found! Download halted.'); if (!preg_match('/video_id=(.+?)(\\\|"|&|(\\\u0026))/', $this->page, $video_id)) html_error('Video id not found.'); $FileName = str_replace(str_split('\\/:*?"|'), '_', html_entity_decode(trim($title[1]), ENT_QUOTES)) . "-[YT-$fmt][{$video_id[1]}]$ext"; if (isset($_REQUEST['ytdirect']) && $_REQUEST['ytdirect'] == 'on') { echo " Click here or copy the link to your download manager to download "; echo ""; } else { $this->RedirectDownload ($furl, $FileName, $this->cookie, 0, 0, $FileName); } } private function captcha($link) { $url = 'http://www.youtube.com/das_captcha?next=' . urlencode($link); if (isset($_REQUEST['step']) && $_REQUEST['step'] == '1') { if (empty($_POST['recaptcha_response_field'])) html_error('You didn\'t enter the image verification code.'); $post = array('recaptcha_challenge_field' => $_POST['recaptcha_challenge_field'], 'recaptcha_response_field' => $_POST['recaptcha_response_field']); $post['next'] = $_POST['next']; $post['action_recaptcha_verify'] = $_POST['action_recaptcha_verify']; $post['submit'] = $_POST['_submit']; $post['session_token'] = $_POST['session_token']; $cookie = urldecode($_POST['cookie']); $page = $this->GetPage($url, $cookie, $post, $url); is_present($page, 'The verification code was invalid', 'The verification code was invalid or has timed out, please try again.'); is_present($page, "\r\n\r\nAuthorization Error.", 'Error sending captcha.'); is_notpresent($page, 'Set-Cookie: goojf=', 'Cannot get captcha cookie.'); $this->cookie = GetCookiesArr($page); $this->page = $this->GetPage($link, $this->cookie); } else { $page = $this->GetPage($url); if (!preg_match('@//(?:[^/]+\.)?(?:(?:google\.com/recaptcha/api)|(?:recaptcha\.net))/(?:(?:challenge)|(?:noscript))\?k=([\w|\-]+)@i', $page, $pid)) html_error('Error: reCAPTCHA not found.'); $data = $this->DefaultParamArr($link, GetCookies($page)); $data['next'] = urlencode(html_entity_decode(cut_str($page, 'name="next" value="', '"'))); $data['action_recaptcha_verify'] = urlencode(cut_str($page, 'name="action_recaptcha_verify" value="', '"')); $data['_submit'] = urlencode(cut_str($page, 'type="submit" name="submit" value="', '"')); $data['session_token'] = urlencode(cut_str($page, "'XSRF_TOKEN': '", "'")); if (isset($_REQUEST['ytube_mp4'])) $data['ytube_mp4'] = $_REQUEST['ytube_mp4']; if (isset($_REQUEST['ytdirect'])) $data['ytdirect'] = $_REQUEST['ytdirect']; if (isset($_REQUEST['yt_fmt'])) $data['yt_fmt'] = $_REQUEST['yt_fmt']; $data['step'] = 1; $this->Show_reCaptcha($pid[1], $data); } } private function Show_reCaptcha($pid, $inputs) { global $PHP_SELF; if (!is_array($inputs)) html_error('Error parsing captcha data.'); // Themes: 'red', 'white', 'blackglass', 'clean' echo "var RecaptchaOptions={theme:'red', lang:'en'};\n"; echo "\n \n"; foreach ($inputs as $name => $input) echo "\n"; echo ""; echo " "; echo " "; echo "\n"; echo "/**/\n"; echo " \n\n"; exit; } private function login($link) { global $premium_acc; if (!empty($this->cookie['SID'])) return; if (!empty($_REQUEST['premium_user']) && !empty($_REQUEST['premium_pass'])) { $user = $_REQUEST['premium_user']; $pass = $_REQUEST['premium_pass']; } else { $user = $premium_acc['youtube_com']['user']; $pass = $premium_acc['youtube_com']['pass']; } if (empty($user) || empty($pass)) html_error('Login Failed: Login Empty.', 0); $post = array(); $post['Email'] = urlencode($user); $post['Passwd'] = urlencode($pass); $post['service'] = 'youtube'; $page = $this->GetPage('https://www.google.com/accounts/ClientLogin', 0, $post, 'https://www.google.com/accounts/ClientLogin'); is_present($page, 'Error=BadAuthentication', 'Login Failed: The login/password entered are incorrect.'); is_present($page, 'Error=NotVerified', 'Login Failed: The account has not been verified.'); is_present($page, 'Error=TermsNotAgreed', 'Login Failed: The account has not agreed to terms.'); is_present($page, 'Error=CaptchaRequired', 'Login Failed: Need CAPTCHA. (Not supported yet)... Or check you login and try again.'); is_present($page, 'Error=Unknown', 'Login Failed.'); is_present($page, 'Error=AccountDeleted', 'Login Failed: The user account has been deleted.'); is_present($page, 'Error=AccountDisabled', 'Login Failed: The user account has been disabled.'); is_present($page, 'Error=ServiceDisabled', 'Login Failed: The user\'s access to the specified service has been disabled.'); is_present($page, 'Error=ServiceUnavailable', 'Login Failed: Service is not available; try again later.'); if (!preg_match('@SID=([^\r|\n]+)@i', $page, $sid)) html_error('Login Failed: SessionID token not found.', 0); $this->cookie['SID'] = $sid[1]; $this->page = $this->GetPage($link, $this->cookie); $this->cookie = GetCookiesArr($this->page, $this->cookie); } private function verify_age($link) { $this->login($link); if (!preg_match('@Location: https?://(www\.)?youtube\.com/verify_age@i', $this->page)) return; $url = 'http://www.youtube.com/verify_age?next_url=' . urlencode($link); $page = $this->GetPage($url, $this->cookie); $post = array(); $post['next_url'] = urlencode($link); $post['set_racy'] = 'true'; $post['session_token'] = urlencode(cut_str($page, "'XSRF_TOKEN': '", "'")); $urlc = 'http://www.youtube.com/verify_age?action_confirm=true'; $page = $this->GetPage($urlc, $this->cookie, $post, $url); $this->page = $this->GetPage("$link&has_verified=1", $this->cookie, 0, $urlc); } private function verify_controversy($link) { $url = 'http://www.youtube.com/verify_controversy?next_url=' . urlencode($link); $page = $this->GetPage($url, $this->cookie); $post = array(); $post['next_url'] = urlencode($link); // $post['ignorecont'] = 'on'; $post['session_token'] = urlencode(cut_str($page, "'XSRF_TOKEN': '", "'")); $urlc = 'http://www.youtube.com/verify_controversy?action_confirm=1'; $page = $this->GetPage($urlc, $this->cookie, $post, $url); $this->page = $this->GetPage("$link&skipcontrinter=1", $this->cookie, 0, $urlc); } private function GetVideosArr($fmtmaps) { $fmturls = array(); foreach ($fmtmaps as $fmtlist) { $arr1 = explode('&', $fmtlist); $fmtlist = $arr3 = array(); foreach ($arr1 as $key => $val) { $arr2 = explode('=', $val); foreach ($arr2 as $key2 => $val2) { $arr3[] = $val2; } } for ($i = 0; $i page, 'class="yt-alert-message">', 'page; $servw = (isset($_GET['useproxy']) && !empty($_GET['proxy'])) ? 'proxy' : 'server'; $errors = array(); $errors[] = array('find' => 'The video you have requested is not available.'); // Empty or no 'error' key will show 'find'. $errors[] = array('find' => 'This video has been removed by the user.'); $errors[] = array('find' => 'The uploader has not made this video available in your country.', 'error' => "The uploader has not made this video available in this $servw's country."); $errors[] = array('find' => ', who has blocked it in your country on copyright grounds.', 'error' => "This video has content with copyright and it's blocked in this $servw's country."); $errors[] = array('find' => 'This video is no longer available because the uploader has closed their YouTube account.'); foreach ($errors as $err) { if (empty($err['find'])) continue; is_present($page, $err['find'], (!empty($err['error']) ? $err['error'] : '')); } } private function QSelector($link) { global $PHP_SELF; $fmtlangs = array(38 => 377, 37 => 228, 22 => 227, 45 => 225, 35 => 223, 44 => 389, 34 => 222, 43 => 224, 18 => 226, 5 => 221, 17 => 220); echo "\n ".lang(216)."."; echo "\n \n"; echo "\n"; echo ' '.lang(217).' '; echo "\n"; foreach ($this->fmturlmaps as $fmt => $url) { if (in_array($fmt, $this->fmts)) echo '".lang($fmtlangs[$fmt]).(!empty($sizes[$fmt]) ? ' ('.$sizes[$fmt].')' : '')."\n"; } echo "\n"; if (count($this->cookie) > 0) $this->cookie = encrypt(CookiesToStr($this->cookie)); $data = $this->DefaultParamArr($link, $this->cookie); $data['ytube_mp4'] = 'on'; foreach ($data as $n => $v) echo("\n"); echo "\n"; echo " \n\n"; exit; } } //re-written by szal based on original plugin by eqbal //updated 07 June 2010 // [28-03-2011] Fixed (!$video_id) regex. - Th3-822 // [29-03-2011] Added support for captcha. - Th3-822 // [02-04-2011] Fixed redirect error. [26-04-2011] Added error msgs. - Th3-822 // [04-8-2011] Fixed for recent changes in fmt_stream_map content & some edits maded for work fine. (Redirect is needed yet) - Th3-822 // [12-8-2011] Added support for videos that need login for verify age & Changed fmt order by quality & Fixed regexps for fileext. - Th3-822 // [13-8-2011] Some fixes & removed not working code & fixed verify_age function. - Th3-822 // [17-9-2011] Added function for skip 'verify_controversy' on youtube && Fixed cookies after captcha && Little changes. - Th3-822 // [26-1-2012] Fixed regexp for get title, added a quality selector (if the one in template is removed) and some changes in the code. - Th3-822 // [17-5-2012] Fixed captcha (Now uses reCaptcha). - Th3-822 // [14-9-2012] Fixed Download links & small changes. - Th3-822 ?>
আমি Anisur Rahman। বিশ্বের সর্ববৃহৎ বিজ্ঞান ও প্রযুক্তির সৌশল নেটওয়ার্ক - টেকটিউনস এ আমি 13 বছর যাবৎ যুক্ত আছি। টেকটিউনস আমি এ পর্যন্ত 14 টি টিউন ও 51 টি টিউমেন্ট করেছি। টেকটিউনসে আমার 0 ফলোয়ার আছে এবং আমি টেকটিউনসে 0 টিউনারকে ফলো করি।
Web Developer at NetBit LTD. i specialize in: SEO, Blogging, Affiliate Program, Hardware and Software, Front-end development, Video Editing. আমার ফেসবুক আই.ডি.: http://facebook.com/bdcmc স্কাইপি আই.ডি.: gsm_noman
কাজ হচ্ছে না । Fatal error: Call to undefined function CookiesToStr() in /home/crystalh/public_html/files/hosts/DownloadClass.php on line 62
Utube কে বাঁশ দেবার জন্য ধন্যবাদ,দারুণ টিউন।