Bueno, el script es largo por eso no lo puse; simplemente esas dos instrucciones.
Ahí va:
Código PHP:
$preview = $HTTP_POST_FILES['preview']['name'];
$theme = $HTTP_POST_FILES['theme']['name'];
$tam_theme = $HTTP_POST_FILES['theme']['size'];
$tam_preview = $HTTP_POST_FILES['preview']['size'];
$nombre = sql_quote($_POST['nombre']);
$nombre = ereg_replace("[^A-Za-z0-9 -:]", "", $nombre);
$tags = $nombre;
$theme_ext = 1;
$preview_ext = strtolower(strrchr($HTTP_POST_FILES['preview']['name'],'.'));
$theme_ext = strtolower(strrchr($HTTP_POST_FILES['theme']['name'],'.'));
$tipo_theme = $_FILES['theme']['type'];
if (($theme_ext == ".p3t") && ($tipo_theme == "application/octet-stream") && ($tam_preview != 0) && ($tam_theme != 0) && ($tam_theme < 15000000)){
header ("Location: http://www.url.com/$theme_ext/$tipo_theme/$tam_preview/$tam_theme/");
}
else{
header ("Location: http://www.url.com/$theme_ext/$tipo_theme/$tam_preview/$tam_theme/");
}
El header me devuelve el tipo y el tamaño del theme vacios como ya he dicho, solo en algunos themes :S