Ytdownloder
'á|à|ả|ã|ạ|ă|ắ|ặ|ằ|ẳ|ẵ|â|ấ|ầ|ẩ|ẫ|ậ',
'd' => 'đ',
'e' => 'é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ',
'i' => 'í|ì|ỉ|ĩ|ị',
'o' => 'ó|ò|ỏ|õ|ọ|ô|ố|ồ|ổ|ỗ|ộ|ơ|ớ|ờ|ở|ỡ|ợ',
'u' => 'ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|ữ|ự',
'y' => 'ý|ỳ|ỷ|ỹ|ỵ',
'A' => 'Á|À|Ả|Ã|Ạ|Ă|Ắ|Ặ|Ằ|Ẳ|Ẵ|Â|Ấ|Ầ|Ẩ|Ẫ|Ậ',
'D' => 'Đ',
'E' => 'É|È|Ẻ|Ẽ|Ẹ|Ê|Ế|Ề|Ể|Ễ|Ệ',
'I' => 'Í|Ì|Ỉ|Ĩ|Ị',
'O' => 'Ó|Ò|Ỏ|Õ|Ọ|Ô|Ố|Ồ|Ổ|Ỗ|Ộ|Ơ|Ớ|Ờ|Ở|Ỡ|Ợ',
'U' => 'Ú|Ù|Ủ|Ũ|Ụ|Ư|Ứ|Ừ|Ử|Ữ|Ự',
'Y' => 'Ý|Ỳ|Ỷ|Ỹ|Ỵ',
);
foreach ($asciiUnicodeMap as $ascii => $uni) {
$string = preg_replace("/($uni)/i", $ascii, $string);
}
$string = str_replace(PHP_EOL, '', $string);
return ($string ?? 'video') ;
}
$target= urldecode($_GET["url"]);
// echo urldecode ($target);
$strName=generateRandomString() . '.mp4';
$fileName='/downloads/'.$strName;
$fp = fopen ( dirname(__FILE__). ''.$fileName , 'w+');
$useragent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1';
set_time_limit(0);
$ch = curl_init(str_replace(" ","%20",$target));
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
curl_exec($ch);
curl_close($ch);
fclose($fp);
//header('Content-disposition: attachment; filename="'.$fileName.'.mp4"');
//readfile($fp);
//echo '';
echo "
Click here to Downlaod" ?>
Click here to Downlaod" ?>