04.09.2015, 16:36
(
Последний раз редактировалось mirou123; 06.09.2015 в 04:30.
)
Thanks for helping but after many tests I found out that the API is acting really strange. First of all the link it's giving is too long I guess because it doesn't want to play. So I added the TinyURL API to my script. And then I noticed an other thing. Each time I refresh the page the link changes. When I access it from my computer it starts downloading the MP3 file but when I take the same link and try it on my VPS, it takes me to an other page. I am suspecting that the file will only work for the IP that requested it? Does anyone have any suggestions?
EDIT: I confirmed it. I got a download link then I changed my IP and it stopped working. The link it gives only works for 1 IP. It defeats the purpose of an API. Does anyone have an idea to get around this issue?
EDIT: I got around this problem by making a PHP script that would download the song to my VPS, stream it from there to the client and then delete the song so they don't use up space.
EDIT: I confirmed it. I got a download link then I changed my IP and it stopped working. The link it gives only works for 1 IP. It defeats the purpose of an API. Does anyone have an idea to get around this issue?
EDIT: I got around this problem by making a PHP script that would download the song to my VPS, stream it from there to the client and then delete the song so they don't use up space.