Reputation: 571
Is it possible to have PHP generate a page from a link on another page that contains links to download files but is not directly accessible through the address bar?
I have to build a sequence for an affiliate marketing program that goes as follows - Sales Page - Affiliate Checkout Page - Thank You Page.
I would like the customer to be able to download the files directly from the Thank You Page, however, I don't want a non-paying customer to be able to type the page address directly into the address bar and have access to the files.
Thanks for the input in advance, sorry if my question is vague, new at this :)
Dustin
Upvotes: 0
Views: 109
Reputation: 1247
Generally what is done is that the logic on the page in question will redirect to another page unless certain conditions are met (the person is logged in, the previous page posted to it, there is data in the database etc) Any page you make is going to be accessable to the browser given the correct conditions are met.
Upvotes: 1
Reputation: 360562
Don't use "obscurity" to hide such things. Have your download/report generator script check if the person requesting the script is allowed to access it, and redirect elsewhere if not.
Using "hidden" urls is like a bank hoping that no one notices the vault is accessible via a screen door around back. Instead, eliminate that screen door and post a security guard in the lobby.
Upvotes: 3