On Tue, 2002-05-21 at 21:02, Billy S Halsey wrote:
> Here's the shell of a script I wrote a while back to do exactly what you 
> want:

Thanks, Billy! That's really helpful. I'm curious as to the significance
of the number 12399. Is this just a random number used as a separator,
or does it indicate the length of one of the parts? (In other words
should I alter the boundary marker to reflect the content I'm sending?)

> <?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.

-- 
======================================================================
D. D. Brierton            [EMAIL PROTECTED]           www.dzr-web.com
        Trying is the first step before failure (Homer Simpson)
======================================================================

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to