从网页的URL下载的MP3与Android失败 [英] download mp3 from web url with android failed
问题描述
我有一个链接,下载他们可以阅读所有这些移动设备上的MP3。
我也有一个宏碁E320采用Android 2.3.4,我想通过点击我的链接下载我的MP3(Web服务器Apache的,这是一个链接后面的一些PHP源)
I have a link to download mp3 on all mobile device they can read them. I also have an Acer E320 with Android 2.3.4 and I want to download my mp3 by clicking my link (web server Apache; this is some PHP source behind that link).
我试图与黑莓,我得到了文件。
我试着与我的Firefox浏览器与三星Galaxy S与Android的用户代理,和我的文件。
我试着用我的宏碁E320具有相同的Android 2.3.4,并...我没有得到的文件。
I tried with a BlackBerry, and I got the file. I tried with my Firefox browser with a user-agent of a Samsung Galaxy S with Android, and I got the file. I tried with my Acer E320 with the same Android 2.3.4, and... I didn't get the file.
我显然相信来自OS,我会了Windows Phone明天试试,但我pretty肯定这会工作。
I am obviously sure that comes from the OS, I'll try with a Windows Phone tomorrow but I'm pretty sure this will works.
下面是我的片源下载:
<?php
// assume that all variables are correctly set
header("Pragma: public");
header("Expires: 0");
header("Cache-Control:");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Type: audio/mpeg");
header('Content-Disposition: attachment; filename="'.$filename.'";');
header("Content-Transfer-Encoding: binary");
header('Content-Range: ' . $download_range);
header('Content-Length: ' . $download_size);
readfile($filename);
?>
感谢你,如果你有任何想法,为什么这code没有在Android手机上运行。
Thank you if you have any idea why this code doesn't work on an Android phone.
编辑:我试着用Windows手机操作系统的HTC。下载没有开始,但我可以看到我在Apache日志命中......这seemes,Android是不是一个人......
I tried with an HTC with Windows Phone OS. The download didn't start but I can see my hit on the apache log... It seemes that Android is not alone...
第二编辑:我finnaly找到它:有一个pre取了Android杀死,因为一个使用令牌我的下载完成。
感谢所有
2nd I finnaly find it: there's a pre-fetch done with Android that kill my download because of a one-use token. Thanks all
推荐答案
我终于找到了:
有一个pre-获取与的Android
杀死,因为一个使用令牌我下载完成。
There's a pre-fetch done with Android
that kills my download, because of a one-use token.
谢谢大家。
这篇关于从网页的URL下载的MP3与Android失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!