header('Content-type: image/gif');
header('Content-Disposition: attachment; filename="archivo.gif"');