Answer the question
In order to leave comments, you need to log in
How to get the file name from a link like site.ru/engine/download.php?id=236?
Hello!
On the page of the site on the DLE engine there is a link to the .rar archive of the form site.ru/engine/download.php?id=236.
When you click on this link, the download of the archive begins, the name of which, for example, is bugaga.rar.
How to get the name of this archive (bugaga.rar) in php?
Answer the question
In order to leave comments, you need to log in
See the Content-Disposition header in the server response, it usually looks like Content-Disposition: attachment; filename=bugaga.rar
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question