Foros del Web » Programando para Internet » PHP »

no funciona antileech en miarroba?

Estas en el tema de no funciona antileech en miarroba? en el foro de PHP en Foros del Web. <? $filename = $_GET['file']; $ext = substr( $filename,-3 ); if( $filename == "" ) { echo "<html><body>ERROR: Empty file to download. USE download.php?file=[file path]</body></html>"; exit; ...
  #1 (permalink)  
Antiguo 23/01/2004, 18:40
 
Fecha de Ingreso: septiembre-2003
Mensajes: 23
Antigüedad: 20 años, 7 meses
Puntos: 0
no funciona antileech en miarroba?

<?
$filename = $_GET['file'];
$ext = substr( $filename,-3 );
if( $filename == "" ) {
echo "<html><body>ERROR: Empty file to download. USE download.php?file=[file path]</body></html>";
exit;
} elseif ( ! file_exists( $filename ) ) {
echo "<html><body>ERROR: File not found. USE download.php?file=[file path]</body></html>";
exit;
};
switch( $ext ){
case "pdf": $ctype="application/pdf"; break;
case "exe": $ctype="application/octet-stream"; break;
case "zip": $ctype="application/zip"; break;
case "doc": $ctype="application/msword"; break;
case "xls": $ctype="application/vnd.ms-excel"; break;
case "ppt": $ctype="application/vnd.ms-powerpoint"; break;
case "gif": $ctype="image/gif"; break;
case "png": $ctype="image/png"; break;
case "jpg": $ctype="image/jpg"; break;
default: $ctype="application/force-download";
}
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: $ctype");
$user_agent = strtolower ($_SERVER["HTTP_USER_AGENT"]);
if ((is_integer (strpos($user_agent, "msie"))) && (is_integer (strpos($user_agent, "win")))) {
header( "Content-Disposition: filename=".basename($filename).";" );
} else {
header( "Content-Disposition: attachment; filename=".basename($filename).";" );
}
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($filename));
readfile("$filename");
exit();
?>


por k no funciona en miarroba este codigo y en lycos si tiene algo k ver el php?
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:10.