create(filename_decode($gedname), PCLZIP_OPT_COMMENT, $comment, PCLZIP_OPT_REMOVE_PATH, filename_decode($temppath)); if ($v_list == 0) print "Error : " . $archive->errorInfo(true); else { unlink(filename_decode($gedname)); if ($removeTempDir) rmdir(filename_decode($temppath)); header("Location: ".encode_url("downloadbackup.php?fname={$zipname}", false)); exit; } exit; } if ($action == "download") { header('Content-Type: text/plain; charset=UTF-8'); // We could open "php://compress.zlib" to create a .gz file or "php://compress.bzip2" to create a .bz2 file $gedout = fopen('php://output', 'w'); switch ($filetype) { case 'gedcom': if (strtolower(substr($ged, -4, 4))!='.ged') { $ged.='.ged'; } header('Content-Disposition: attachment; filename="'.$ged.'"'); export_gedcom($GEDCOM, $gedout, $exportOptions); break; case 'gramps': header('Content-Disposition: attachment; filename="'.$ged.'.gramps"'); export_gramps($GEDCOM, $gedout, $exportOptions); break; } fclose($gedout); exit; } print_header(i18n::translate('Download GEDCOM')); ?>


  GEDCOM
  Gramps XML GEDCOM  
Gramps XML  
  
  
  
  
  
  
/>  
/>  
/>  




To make sure that the file was downloaded correctly, check that the last line of a file in GEDCOM format is 0 TRLR or that the last line of a file in XML format is </database>. These files are text; you can use any suitable text editor, but be sure to not save the downloaded file after you have inspected it.

In general, it could take as much time to download as it took to import your original GEDCOM file.') . "


\n"; print_footer(); ?>