Before I continue - let me just say that mail shouldn't really be used for this kind of transfer - it IS used for this kind of transfer, but it really shouldn't be - this is what FTP was made for 😉
Now...if you're on a *nix system, you could use wget to grab the file, assuming you have the url...
exec("wget -P yourdir http://www.blah.org/file.zip");
yourdir should be writable by php
(note that if you're planning on passing the URL in from a form, you'll want to use EscapeShellCmd() on the input string first for security reasons)
Now - once you've gotten the file - it'll be in yourdir/file.zip - one down, one to go - now we have to get the file into an email.
I'm not going to get deeply into MIME stuff here - you basically create a MIME email header and boundary, then use the boundary to seperate the body from the file itself - this all gets saved to a single string, which is then passed to the mail() function. (this is greatly oversimplified 😉 )
In any case, there's an article on PHPBuilder that should get you started:
http://www.phpbuilder.com/columns/kartic20000807.php3
In addition, the new Beginning PHP4 Wrox book has a nice little section on MIME that should help you out too =)
-b3