Ask the header to force the download problem

Source: Internet
Author: User
Novice, research for a long time do not know how to solve, implore predecessors answer.

 
  


error message: ReadFile (Http://tsmusic24.tc.QQ.com/105588684.mp3): Failed to open stream:http request failed! http/1.1 Bad Request

The browser can access the link normally, using the header but unable to force the download, try Curl Access, get 400 status code.


Reply to discussion (solution)

I have tried, can, whether in the local or official domain name can be, is the configuration problem it

I have tried, can, whether in the local or official domain name can be, is the configuration problem it



Could you please put down some of your function code? I try not to run properly on both the local and the server

Run your code on my local, completely no problem, download the MP3 file directly.


I have tried, can, whether in the local or official domain name can be, is the configuration problem it



Could you please put down some of your function code? I try not to run properly on both the local and the server

No part of the code, is to directly copy your code, you can download, so you do not have to check the code problems, from other issues, such as whether some of the server's library is not open, or PHP download configuration, etc.

Run your code on my local, completely no problem, download the MP3 file directly.


In other words, is the full size of the MP3 file available for download?

Don't talk nonsense upstairs! Is this also a download?

203 bytes is a MP3?



I have tried, can, whether in the local or official domain name can be, is the configuration problem it



Could you please put down some of your function code? I try not to run properly on both the local and the server

No part of the code, is to directly copy your code, you can download, so you do not have to check the code problems, from other issues, such as whether some of the server's library is not open, or PHP download configuration, etc.


In other words, is the full size of the downloaded MP3 file?

Don't talk nonsense upstairs! Is this also a download?

203 bytes is a MP3?


The browser opens the link, the resulting music file is complete (above m), and the header is forced to download the error message (203b)

When you open the downloaded Title.mp3 with a text editor, you can see just a few error messages
Correct those mistakes before you get the right results.

$file = ' Http://tsmusic24.tc.QQ.com/105588684.mp3 '; ReadFile ($file);


Warning: ReadFile (Http://tsmusic24.tc.QQ.com/105588684.mp3): Failed to open stream:http request failed! http/1.1 Bad Request
In .....
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.