Hi,
Here's the shell of a script I wrote a while back to do exactly what you
want:
<?php
header("Content-Type: multipart/mixed; boundary=\"-Boundary-12399\"");
print "---Boundary-12399\r\n";
print "Content-Type: text/html\r\n";
print "\r\n";
// Your HTML code goes here
print "\n";
print "---Boundary-12399\r\n";
print "Content-Type: application/octet-stream\r\n";
print "Content-Disposition: attachment; filename=foo.tar.gz\r\n\r\n";
readfile("./foo.tar.gz");
print "---Boundary-12399--\r\n";
print "\r\n";
?>
Note the format of the "Boundary" headers, especially the dashes.
/bsh/
--
/---------------------------------------------=[ BILLY S HALSEY ]=--\
| Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW |
| "All opinions and technical advice offered in this message are my |
| own and not necessarily endorsed by my employer." |
\--=[ [EMAIL PROTECTED] ]=--------------------------------------------/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php