Hi Charlie,
This one could be a little tricky. Why is it that you must run the PHP script? Are you customizing each download? There is a file "signup-xtra.php" which can be found in the ListMail/xtra folder. When this file is moved to the main ListMail folder it, and any code contained within it, will be executed on every signup and optionally during import and manual addition.
If the email address is _optional_ I don't know if you should be using ListMail's signup.php as the target for the form POST because it expects and requires the email address. You might instead use a custom script and use that to insert into ListMail if the email address is provided. This is as easy as a single PHP line as follows:
fopen("http://example.com/mail/signup.php?email=$email&fname=".urlencode($firstname));
Regards