Reputation:
I want to create a simple app using PHP for uploading videos. But, I want to make sure it is not accessible for download but can be embedded in my app so I can play it. How can I do this?
It was inspired with this question php restrict access to files in directory but I really don't get how it works.
Upvotes: 1
Views: 1223
Reputation: 6252
You can just do it by storing data outside the public DocumentRoot and using PHP to deliver the file.
But i would recommend you to use .htaccess
file for this purpose.
You can do it with .htaccess
file like
deny from all
Please have a look here too.I think this is what you've wanted.
Upvotes: 1