Hi, I'm new here!
Here is the problem, I wanted to to be able to offer a save as window for a known file type. After a bit of searching, it seemed some simple php would allow me to do this. To complicate things my main host does not support php, but I did have another free host that does.
So this is what I have, some code in a file called download.php
<?php
header('Content-disposition: attachment; filename="name of my file"');
header('Content-type: audio/mpeg3');
readfile('http://host-with-out-php/file.mp3');
?>
download.php is hosted on the php host.
The mp3 is hosted remotely. I have a page on the remote site with a link to download.php
Now it actually works, but something is not right, as the download speed is much slower, than if I download using a direct url from the remote site.
I suspect readfile() is not a good choice when reading from different domains.
What is the reason for the slowness, and what is simple solution ?
Thanks
-A