There's a way you can do it in PHP:
http://forums.devshed.com/archive/t-67502
The basic code:
// check that the user has paid.
// if they have
if($paid == "yes"){
header("Content-type: application/pdf");
header("Content-Disposition: attachment; filename=DesiredFileNameForClient.pdf");
readfile('FileOnServer.pdf');
} else {
echo "You havent paid for this!";
}
Change the content-type to what you want. Change FileOnServer.pdf to your file to want people to be able to d/l after paying, and add an if clause to the beginning to check to see if the user has paid. If they they, they'll be given the file to download, otherwise they'd be given the "You haven't paid!" message.
Just save the file as download.php and link to that.
"To do is to be" - Descartes
"To be is to do" - Voltaire
"Do be do be do" - Frank Sinatra