Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/11/2004, 12:06
Avatar de TMeister
TMeister
Crazy Coder
 
Fecha de Ingreso: enero-2002
Ubicación: En la Oficina
Mensajes: 2.880
Antigüedad: 22 años, 3 meses
Puntos: 193
Con PHP algo asi

Código PHP:
<?php
$file 
"algo.jpg"
header("Content-Disposition: attachment; filename='$file'\n");
header("Content-transfer-encoding: binary\n");   
header("Content-length: " filesize($file) . "\n");
if (
strstr($HTTP_USER_AGENT,"MSIE") && strstr($HTTP_USER_AGENT,"Mac_PowerPC")){
    
header("Content-type: application/force-download\n");
}else{
    
header("Content-type: application/octet-stream\n");
}
$fp=fopen($file"r");
fpassthru($fp);
?>