D
D
Dmitry2019-02-06 22:39:16
PHP
Dmitry, 2019-02-06 22:39:16

How to make an alias with header audio on your site?

How to make an alias with header audio on your site, that is, an example:
There is a link to the song site.com/beatles.mp3
Can I intercept it without downloading, for example, my site my-site.com/beatls.mp3 took the song from here site. com/beatles.mp3
I tried to implement it this way, but no result

header('Content-Disposition: inline;filename="https://site.com/beatles.mp3"');

Probably the song needs to be downloaded for this method to work, but I need it to take the link, I'm interested in the implementation in php
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Korobkov, 2019-02-07
@BorisKorobkov

header("HTTP/1.1 301 Moved Permanently"); 
header("Location: https://site.com/beatles.mp3");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question