Am trying to download remote .mp4 but want to change or delete site name tag from it ...
want to change djmaza.life and download it from it
Started on the old forum in September 2017 · view the original in the archive · old links redirect here
Am trying to download remote .mp4 but want to change or delete site name tag from it ...
want to change djmaza.life and download it from it
<?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;
?>
Make sure you remove the space before <?php (coding talks bbcode auto puts that there)
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:
$url = $_GET['url'];
or maybe another way, it really depends on your site setup.
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 type