indicator Posted February 6, 2012 Share Posted February 6, 2012 Hello guyz, Well i am storing some files on my server, i want only members to be able to download files. these are what i want to do : I should have an initial URL like this : "http://mysite/file/{file_id}/filename.mov so i will be checking to see if member is logged in, if yes then it should generate a temporary id which will expire within 1 day and start the download automatically! I have coded the user class which checks if its logged in, and i am generating the id, but the problem is how to show the final file url like this : http://mysite/file/{sha1 or something very random}/filename.mov and let it to be downloaded. thanks Quote Link to comment https://forums.phpfreaks.com/topic/256551-php-download-based-on-random-id/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.