I m working on a project which uses an API to fetch URL of a video or audio, I want users to able to download the video/audio and for that I wrote script to force download the file. Everything is working correctly, but I recently discovered that other similar tools/apps uses a different host/domain to run the force download script.
for example, if their website is
, the download link will be something like
dl.something.com/download?token=
the problem is I do not know how to achieve this corretly, if my website is
, force downloading script can be executed by
so my questions are –
- Why others are using different server to host force download script ?
- What will be the correct way to achieve this, without using database, how session variables can be passed to a different host ?
- does it affect bandwidth ?
Apologies if I did not clarify everything correctly or if the questions are not correct, but m a beginner and couldn’t find answer to this anywhere