perdon el codigo es este:
Código PHP:
Ver original<?php
$file_title = $_GET['title'];
$file = "http://www.servidorremoto.com/carpeta/video12312.mp4";
function extension($filename){
}
$ext = extension($file);
switch($ext)
{
case 'mp4':
$ctype = "video/mp4";
break;
case 'avi':
$ctype = "video/x-msvideo";
break;
case 'mov':
$ctype = "video/quicktime";
break;
case 'mpeg':
$ctype = "video/mpeg";
break;
case 'flv':
$ctype = "video/x-flv";
break;
case '3gp':
$ctype = "video/3gpp";
break;
case '3g2':
$ctype = "video/3gpp2";
break;
case 'f4v':
$ctype = "video/x-f4v";
break;
case 'h261':
$ctype = "video/h261";
break;
case 'h263':
$ctype = "video/h263";
break;
case 'h263':
$ctype = "video/h263";
break;
case 'h264':
$ctype = "video/h264";
break;
case 'm4v':
$ctype = "video/x-m4v";
break;
case 'wmv':
$ctype = "video/x-ms-wmv";
break;
}
// We'll be outputting a PDF
header('Content-type: '.$ctype.''); // It will be called downloaded.mp4
header('Content-Disposition: attachment; filename="'.$file.'.'.$ext.'"'); ?>