ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/st1.123vid.net/ |
<?php function str_encode($data,$pwd) { $x = 0; $a = 0; $j = 0; $Zcrypt = ''; $pwd_length = strlen($pwd); for ($i = 0; $i < 255; $i++) { $key[$i] = ord(substr($pwd, ($i % $pwd_length)+1, 1)); $counter[$i] = $i; } for ($i = 0; $i < 255; $i++) { $x = ($x + $counter[$i] + $key[$i]) % 256; $temp_swap = $counter[$i]; $counter[$i] = $counter[$x]; $counter[$x] = $temp_swap; } for ($i = 0; $i < strlen($data); $i++) { $a = ($a + 1) % 256; $j = ($j + $counter[$a]) % 256; $temp = $counter[$a]; $counter[$a] = $counter[$j]; $counter[$j] = $temp; $k = $counter[(($counter[$a] + $counter[$j]) % 256)]; $Zcipher = ord(substr($data, $i, 1)) ^ $k; $Zcrypt .= chr($Zcipher); } return $Zcrypt; } $id = $_GET['id']; $title = $_GET['title']; $file = str_encode(hex2bin($id), 'vidoe@top'); download($file,$title, 4000000); /* Set Headers Get total size of file Then loop through the total size incrementing a chunck size */ function download($file,$title, $chunks) { set_time_limit(0); header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-disposition: attachment; filename=' .$title.'.mp4'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Expires: 0'); header('Pragma: public'); $size = get_size($file); header('Content-Length: ' . $size); $i = 0; while ($i <= $size) { //Output the chunk get_chunk($file, (($i == 0) ? $i : $i + 1), ((($i + $chunks) > $size) ? $size : $i + $chunks)); $i = ($i + $chunks); } } //Callback function for CURLOPT_WRITEFUNCTION, This is what prints the chunk function chunk($ch, $str) { print($str); return strlen($str); } //Function to get a range of bytes from the remote file function get_chunk($file, $start, $end) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $file); curl_setopt($ch, CURLOPT_RANGE, $start . '-' . $end); curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); curl_setopt($ch, CURLOPT_WRITEFUNCTION, 'chunk'); $result = curl_exec($ch); curl_close($ch); } //Get total size of file function get_size($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_NOBODY, true); curl_exec($ch); $size = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD); return intval($size); } ?>