Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/07/2010, 00:02
Avatar de mandrake88
mandrake88
 
Fecha de Ingreso: septiembre-2009
Mensajes: 328
Antigüedad: 14 años, 7 meses
Puntos: 13
Respuesta: Proteger descarga externa con phpBB

Código PHP:
<?php
define
('IN_PHPBB'true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH './';
$phpEx substr(strrchr(__FILE__'.'), 1);
include(
$phpbb_root_path 'common.' $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

page_header('Title Here');
if (
$user->data['user_id'] == ANONYMOUS)
{
         
login_box(''$user->lang['LOGIN']);
} else{
         
$id "archivo.zip"
         
$enlace "Directorio/".$id
         
header ("Content-Disposition: attachment; filename=".$id." "); 
         
header ("Content-Type: application/zip"); 
         
header ("Content-Length: ".filesize($enlace)); 
         
readfile($enlace);
}
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
Intenta con eso