Hello,
I wan't to set up a download section for my music, I am currently working on the PayPal IPN code and shopping basket.
What I'm wondering is how do I create a link to a perl script that validates the download request and then streams the mp3 file as a download, so the save prompt is offered.
If I passed the script some get variables and validated the request and just used
this would just play the tune as if a normal mp3 link was clicked wouldn't it?
Also I wouldn't want to have the file sitting in a directory that anyone could just type the url and get the file, and if the files are in the 'private' part of the hosting then the URL would just be 'Access Denied' or invalid.
I don't want to create temporary files and track them for deletion, that could soon fill up my webspace, if 10 people clicked to download then that would make 11 copies of the tune (including the original), not a good approach surely.
I was wondering if something like a passthrough module was available for this or even using something like LWP.
So I get the script to validate the request, then use some module to read the file into a variable and then pass that through to the client as a data download file.
is this possible and if so what module do i need to use.
An example of usage would be really cool ;-)
Thanks,
1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
I wan't to set up a download section for my music, I am currently working on the PayPal IPN code and shopping basket.
What I'm wondering is how do I create a link to a perl script that validates the download request and then streams the mp3 file as a download, so the save prompt is offered.
If I passed the script some get variables and validated the request and just used
Code:
print "Location: url_of_file\n\n";
Also I wouldn't want to have the file sitting in a directory that anyone could just type the url and get the file, and if the files are in the 'private' part of the hosting then the URL would just be 'Access Denied' or invalid.
I don't want to create temporary files and track them for deletion, that could soon fill up my webspace, if 10 people clicked to download then that would make 11 copies of the tune (including the original), not a good approach surely.
I was wondering if something like a passthrough module was available for this or even using something like LWP.
So I get the script to validate the request, then use some module to read the file into a variable and then pass that through to the client as a data download file.
is this possible and if so what module do i need to use.
An example of usage would be really cool ;-)
Thanks,
1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.