Hi,
I did a lot of googling on this subject, but still no luck and I'm now begining to lose hope.
I am trying to implement a function where a user can paste a link (URL) to a file he/she wants to download and the script outputs the file name, type and size (this is just a small bit of my larger project). Very often links are not direct and redirected through php scripts. Such as this mp3 on my own band's website running a CMS:
http://www.soyamodified.com/download.ph ... 91617,22,1
When you click on it in the browser, it lets you download the file as "Soya Modified - 05 Tune Up Your Life (demo).mp3" - is there a way of "converting" that URL into this filename through PHP?
Thank you very much and hopefully I've explained my problem clearly enough.
ANY ideas appreciated!
Tracing redirect URL
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Users will paste any URL they like (not from a list), which the script will then try to download to the server.
The problem is that often they might paste non-direct URLs (redirection links) because on a browser they point to the actual file anyway.
Is there a way to simulate browser-style handling of URLs (such as used by download managers - where even if you type a redirect URL, it will download the actual file, not the HTML that contains redirection code?
Many thanks!
The problem is that often they might paste non-direct URLs (redirection links) because on a browser they point to the actual file anyway.
Is there a way to simulate browser-style handling of URLs (such as used by download managers - where even if you type a redirect URL, it will download the actual file, not the HTML that contains redirection code?
Many thanks!
