I have seen a few posts inquiring about this, but no real answer...

I have an intranet application that generates customized PDFs. As an example, a user can select 5 cities and the PDf will have the 10 day weather forecast for those cities.

What I am thinking would be ideal...

a. Zen-Cart could simply point to a PHP file. The PHP file would be downloaded (accessed) and face same restrictions as a traditional downloaded file. The PHP would then take them through the steps to build PDF. If the user were to try accessing the same PHP link again, it would not work.

b. The download content would be a javascript redirect to the PHP.

Would the above be possible? Any recommendations to accompish what I am looking for?