change or remove
Collapse
X
-
PHP Code:<?php
$url = 'http://videodl.djmaza.click/storage/0717/Hawayein%20%20-%20Jab%20Harry%20Met%20Sejal%20-%20DJMaza.Life.mp4';
$name = explode("/", $url);
$name = str_replace('DJMaza.Life','Your Site Name',$name[5]);
$headers = get_headers($url,1);
$fsize = $headers['Content-Length'];
header('Content-Description: File Transfer');
header('Content-Type: video/mp4');
header('Content-Disposition: attachment; filename='.$name);
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: '.$fsize);
ob_clean();
flush();
readfile($url);
exit;
?>Last edited by something else; 05.09.17, 18:15.
-
Its for a single file at a time although you could easily put it on a for loop for multiple items to download at one time, how ever doing so will put your server under strain.
To use it you will need to change the string: $url - depending on your site set up, this could be pulled from your database or could be passed through a link eg:
Code:$url = $_GET['url'];
Comment
-
it's working dear ...
I have put the .php file ..
I want to hide ext .php from file name to be display and
I want to display latest file on top n rest on ..file latest uploaded display on top
on one page I want to display 15 files like autoindex typeLast edited by hon3y; 13.09.17, 06:02.
Comment
Comment