I'm working on a download counter script and I'm having a bit of trouble with the
header('Content-Disposition: attachment; filename="filename.mp3"');
... portion of my code.
that completely makes sense to me, but in my database, the entire URL is stored (ex. "http://www.mydomain.com/mp3/thisisa-filename.mp3")
... is there any way to split "thisisa-filename.mp3" from the rest of the URL? The files will be located on different servers, so I can't just trim off the first 28 characters every time and be left with the file name
any ideas on how i could pull the filename from the URL?