【求助】能用php下载别的网站的流媒体文件吗【急】
如题,希望下载开始后,过程不需要手动操作
比如下载http://dl.dropbox.com/u/2707242/shuisuo.wma
各位高手帮帮忙啊
跟下载普通文件一样,楼主找找下载方面的贴子改改就可以了!
PHP code:
<?php
$filename = "theDownloadedFileIsCalledThis.mp3";
$myFile = "/absolute/path/to/my/file.mp3";
$mm_type="application/octet-stream";
header("Cache-Control: public, must-revalidate");
header("Content-Type: " . $mm_type);
header("Content-Length: " .(string)(filesize($myFile)) );
header('Content-Disposition: attachment; filename="'.$filename.'"');
header("Content-Transfer-Encoding: binary\n");
readfile($myFile);
?>
相关问答:
各位大些
求一段php代码
可以实现以下功能
针对不同的浏览器显示不同的图片
就是有一张图片,只想给ie6用户看到
如果ie7、chrome、firefox用户浏览则显示另外一张图片
价格不要太离谱就行 ......
1.精通面向对象的设计和开发;
2.熟练使用PHP语言(5.0+)进行数据库,网络通信,文件读写,安全机制等开发;
3.熟练使用MYSQL(5.0+)数据库开发,包括基本的数据库设计/优化/安全,复杂的T-SQL语句编写,熟练编写MYS ......
<!--购买数量-->
<div class='buyinfo'>
<table width='auto'>
<tr>
<td><span>购买数量:</sp ......
代码如下:
function uc_get_user($username, $isuid=0) {
$return = call_user_func(UC_API_FUNC, 'user', 'get_user', array('username'=>$username, 'isuid'=>$isuid));
return UC_CONNECT == 'mysql' ......
请问,以下代码,为什么不管用?就str_replace这个函数,替换么有起作用?
PHP code:
$gg='<script type=\"text/JavaScript\">
alimama_pid=\"mm_14281022_2030060_8250750\";
alima ......