I made a tool for downloading music websites online. It was written in PHP and included Content-type & Content-Disposition in the MIME protocol. It was tested on computers and Android devices and can be downloaded normally. The code is as follows (used for testing. The code layout is a bit messy. Please bear with me. ):
MP3 format files are directly parsed and played by the browser when opened in the browser. The purpose of this online tool is to obtain the link (MP3 format) from a website and then force the browser to download the MP3 file through the MIME protocol instead of playing it online. Assuming that it is good The website address is: http://www.w00yun.top/echo.php
By entering the link in this way, you can directly download the file in MP3 format, and it has been successfully tested on computers and Android browsers. However, when you get it on an iPhone and use the Safari browser that comes with the iPhone, the download is as simple as this:
I am just a PHP enthusiast, I have never learned programming professionally, and I have never done any programming-related work. After Baidu learned that the browser that comes with the iPhone cannot download things at will, I then used the QQ browser on the iPhone to download it. It can be downloaded, but the download file size is obviously wrong:
So I started to test what went wrong. Through Google, I saw on oschina that the style of the form submit button is invalid on Safari browser
I thought it was a problem with form submission, but after checking the answer, I found that it was not the answer I wanted. And through testing, if you comment out the MIME protocol, the download link obtained directly through the form submission output can be obtained normally
From this, I judged that it was not the cause of the form, and then I directly assigned the link to the variable separately. I found that it can be downloaded normally through the MIME protocol download, and the song size is normal and can be played:
In this way, it is possible to obtain the download link or download directly through the MIME protocol in the QQ browser of the iPhone, but it is not possible to download the normal file through extracting the link through the form and then downloading through MIME. I don’t know what the problem is. I hope it can be done. Please help with the answer, thank you!
I made a tool for downloading music websites online. It was written in PHP and included Content-type & Content-Disposition in the MIME protocol. It was tested on computers and Android devices and can be downloaded normally. The code is as follows (used for testing. The code layout is a bit messy. Please bear with me. ):
MP3 format files are directly parsed and played by the browser when opened in the browser. The purpose of this online tool is to obtain the link (MP3 format) from a website and then force the browser to download the MP3 file through the MIME protocol instead of playing it online. Assuming that it is good The website address is: http://www.w00yun.top/echo.php
By entering the link in this way, you can directly download the file in MP3 format, and it has been successfully tested on computers and Android browsers. However, when you get it on an iPhone and use the Safari browser that comes with the iPhone, the download is as simple as this:
I am just a PHP enthusiast, I have never learned programming professionally, and I have never done any programming-related work. After Baidu learned that the browser that comes with the iPhone cannot download things at will, I then used the QQ browser on the iPhone to download it. It can be downloaded, but the download file size is obviously wrong:
So I started to test what went wrong. Through Google, I saw on oschina that the style of the form submit button is invalid on Safari browser
I thought it was a problem with form submission, but after checking the answer, I found that it was not the answer I wanted. And through testing, if you comment out the MIME protocol, the download link obtained directly through the form submission output can be obtained normally
From this, I judged that it was not the cause of the form, and then I directly assigned the link to the variable separately. I found that it can be downloaded normally through the MIME protocol download, and the song size is normal and can be played:
In this way, it is possible to obtain the download link or download directly through the MIME protocol in the QQ browser of the iPhone, but it is not possible to download the normal file through extracting the link through the form and then downloading through MIME. I don’t know what the problem is. I hope it can be done. Please help with the answer, thank you!