Phpheader jump to ie

Source: Internet
Author: User
The phpheader jumps to the ie issue. The Cine site provides bt download for the movie. because the Polaroid player is used, a hash file of the movie will be uploaded at the same time when the movie is uploaded. This hash file is used to dynamically generate the corresponding bt seed for saving (specifying the path) during the first request and provide download. When you click to download the bt seed, first check whether the corresponding bt seed file exists in the corresponding directory. If yes, download it directly. otherwise, download it again. Php header redirection to ie under Bt seeds

The movie site provides bt download for the movie. because the Polaroid player is used, a hash file of the movie will be uploaded at the same time when uploading the movie. This hash file is used to dynamically generate the corresponding bt seed for saving (specifying the path) during the first request and provide download. When you click to download the bt seed, first check whether the corresponding bt seed file exists in the corresponding directory. If yes, download it directly. otherwise, download it again.

The download of Bt seeds directly uses the header redirection method in the file. The PHP file is gbk encoded.

Later, we found that chrome, firefox, and ie6 both work normally, but in ie8, we may find that files cannot be found. This made me very depressed. ie6 can be used, and the result is still problematic in ie8.

// Point to the torrent file and download the file // $ torrent_file_url = "torrent/tyvod1/Science Fiction/Raytheon. torrent "$ redirect_url =" http://vod.cqjtu.edu.cn /". $ torrent_file_url; Header ("HTTP/1.1 303 See Other"); Header ("Location :". $ redirect_url); exit ();

After comparison and test, it is found that ie8 cannot be downloaded if the path contains Chinese characters. The PHP file itself is GBK encoded, so before the jump, we first convert the gbk encoded string to utf8 encoding.

// Point to the torrent file and download the file // $ torrent_file_url = "torrent/tyvod1/Science Fiction/Raytheon. torrent "$ redirect_url =" http://vod.cqjtu.edu.cn /". $ torrent_file_url; Header ("HTTP/1.1 303 See Other"); Header ("Location :". iconv ("gbk", "UTF-8", $ redirect_url); exit ();

Now, there is no problem in chrome, firefox, ie8, and ie9, but it cannot be downloaded in ie6. Chinese characters are garbled. The reason is that ie6's support for UTF-8 is not perfect. Nima ie is really difficult to serve, whether it is GBK encoding or UTF-8 encoding, chrome and firefox can be correctly resolved, ie's own brother has such a problem.

I didn't find a good solution. I had to do it for ie6...

// Point to the torrent file and download the file // $ torrent_file_url = "torrent/tyvod1/Science Fiction/Raytheon. torrent "$ redirect_url =" http://vod.cqjtu.edu.cn /". $ torrent_file_url; Header ("HTTP/1.1 303 See Other"); if (strpos ($ _ SERVER ['http _ USER_AGENT '], 'msie 6.0') === false) {// non-ie6Header ("Location :". iconv ("gbk", "UTF-8", $ redirect_url);} else {// ie6Header ("Location :". $ redirect_url);} exit ();

I don't know if any of you have encountered this problem or have a better solution.

Let's talk about Bao Litong. I don't know if anyone has used it. How can this problem be solved. The good thing is that p2p is good. The bad thing is that it is inconvenient to use. the official team only provides basic examples of little information. And the. hash file, just generate torrent directly. Tracker is actually set as its own tracker and cannot be changed. This is useless for intranet users. However, you can modify the tracker after uninstalling the official installer. It was originally intranet p2p, and it is much safer and more stable to build a tracker than the Internet tracker provided by it.

If anyone has a better free Lan p2p solution, please let me know ).



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.