I have dedicated server, control panel is DirectAdmin and OS is linux. Using the copy copy ( "https://example.com/file.mp3" , string $dest)
command in PHP, The file can be copied. How can I prevent? Prevent copying server to server this link for example: https://example.com/file.mp3
Asked
Active
Viewed 191 times
0

frzdno
- 172
- 9
-
If the file is publicly accessible through a web-server, anybody can copy it anywhere. – jeroen Dec 26 '16 at 09:26
-
@jeroen There is no way? – frzdno Dec 26 '16 at 09:28
-
move it outside the root directory of the web server. – Federkun Dec 26 '16 at 09:30
-
@Federkun For example, which directory? – frzdno Dec 26 '16 at 09:34
1 Answers
1
Take a look at this question on ServerFault (assuming you use Apache2):
Apache .htaccess file to restrict access to file except when loaded from a certain url
or this:
control Apache referrer to restrict downloads in htaccess file