php如何实现代理下载文件 http://www.cnblogs.com/sum41van/articles/1422450.html 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 b.com/a.php?url=http://a.com/a.rar如果文件不大可以这样写$url = isset($_GET['url'])? $_GET['url'] : '';if($url){ $content = file_get_contents($url); if($content){ header('cache-control:public'); header('content-type:application/octet-stream'); header('content-disposition:attachment; filename='.basename($url)); echo $content; }} 要保证1.天朝可以访问b.com2.b.com可以访问a.com 可以使用 curl$url = '传入的目标url';$ch = curl_init(); //初始化curl_setopt($ch, CURLOPT_URL, $url);//curl_setopt($ch, CURLOPT_REFERER, '某个来路url'); //伪造来路页面curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_WRITEFUNCTION, 'func');curl_exec($ch); //执行function func($ch, $str) { static $s = '@'; if($s) { $s = trim($str); if($s) header($s); }else echo $str; return strlen($str);} 下載過的文件大小加起來?echo strlen($content); 可以獲取大小后記錄在數據庫。 下載過的文件大小加起來?echo strlen($content); 可以獲取大小后記錄在數據庫。谢谢啦,今天学了一天的html把代码整合进去的作品 下載過的文件大小加起來?echo strlen($content); 可以獲取大小后記錄在數據庫。谢谢啦,今天学了一天的html把代码整合进去的作品http://qqgae.byethost16.com/1/ 请教PHP的SSO(单点登录)解决办法??? 如何实现多种条件组合的搜索排序 在线等PHP<a href = ></a> 跳转画面传值 找不到指定画面的问题 把list换成dropdownlist 求sql帖子随机调用问题 用nusoap做soap的时候怎么样注册一个类里面的全部方法? 这个批处理如何写,如何定时运行(急!!!!!!!!!) CakePHP求救求救~ [东莞]招聘PHP程序员. 超级难题 插入数据的问题 手机app接口有什么特点?
如果文件不大可以这样写$url = isset($_GET['url'])? $_GET['url'] : '';if($url){
$content = file_get_contents($url);
if($content){
header('cache-control:public');
header('content-type:application/octet-stream');
header('content-disposition:attachment; filename='.basename($url));
echo $content;
}
}
1.天朝可以访问b.com
2.b.com可以访问a.com
$ch = curl_init(); //初始化
curl_setopt($ch, CURLOPT_URL, $url);
//curl_setopt($ch, CURLOPT_REFERER, '某个来路url'); //伪造来路页面
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_WRITEFUNCTION, 'func');
curl_exec($ch); //执行function func($ch, $str) {
static $s = '@';
if($s) {
$s = trim($str);
if($s) header($s);
}else echo $str;
return strlen($str);
}
下載過的文件大小加起來?
echo strlen($content);
可以獲取大小后記錄在數據庫。
下載過的文件大小加起來?
echo strlen($content);
可以獲取大小后記錄在數據庫。
谢谢啦,今天学了一天的html把代码整合进去的作品
下載過的文件大小加起來?
echo strlen($content);
可以獲取大小后記錄在數據庫。
谢谢啦,今天学了一天的html把代码整合进去的作品
http://qqgae.byethost16.com/1/