Hello. Help me please. How to make a temporary link to the file at the time of subscription to a unique link for each subscriber? For example: http://example.com/public/qwert123/file.txt Files should be downloaded without a password for direct link. Can I do this with aMember? Thank you.
Can you explain in more detail why you are doing this? there may be a plugin to handle it (personal content plugin) David
This is necessary for the user to download a file from a known link to it in the period of the subscription without a password.
Here is an example how you can add a link to member's area Useful links block: http://www.amember.com/docs/How_to_add_own_link_to_"Useful_Links"_block_in_member's_area Inside function if you need an access to user's information you can retrieve user object: $user = Am_Di::getInstance()->auth->getUser();
Thank you. With this method, I will show the only links to the user? At the end of the subscription if the user remembers a link, it will be able to use it?
Requires two conditions: 1. It is necessary that during the active subscription link worked, and after the end of the subscription link stopped working. 2. Access to the link - without a password.
You can't protect link such way. This is just impossible. User will be able to write down link URL and use it later. So you have to protect that file.
And if you do so? 1. Shared file, which should give users during the subscription, place in an open folder called md5 hash, example: http://host.com/1234567890/file 2. During the beginning of subscription for the user to generate unique md5 hash, example: 0987654321 and give the customer a personal link like http://host.com/0987654321/file 3. With mod-rewrite redirect all personal hash links to the physical file is in http://host.com/1234567890/file 4. After the expiration of the subscription period, remove from the mod-rewrite hash personal user.
Yes this can be done as customization. I though you were talking about file which is located on different server.