I have a simple, yet critical question (critical for my application)
I will have a file url as:
http://a.com/b.jpg
http://a.com/b.zip
http://a.com/b.mp3
<or any valid file>
When user will click on download link for any specific file (say b.jpg) on my site i.e., b.com, user will see url as
http://b.com/?f=1
I don't want user to see original URL and secondly, want to force download of file, irrespective of filetype
I know that I can achieve this using readfile (Check Example1 at http://php.net/manual/en/function.readfile.php), but I don't know filesize and mimetype, how can I get assurance that file will be downloaded properly?
Please help guys