|  | 
 
 发表于 2011 年 8 月 21 日 12:55:26
|
显示全部楼层 
| 本帖最后由 vax 于 2011-8-21 13:09 编辑 
 将这个代码保存为down.php 上传到你的服务器,然后访问这个地址down.php?pwd=’你的密码’复制代码    
  <form method=”post”>
    <input name=”url” size=”50″ />
    <input name=”submit” type=”submit” />
    </form>
    <?php
    $pwd=’ooxxxooxooxoxo’;//这里为你的密码
    if ($_REQUEST['pwd']!=$pwd)
    exit(‘Sorry ,you are not validate user!’);
    // maximum execution time in seconds
    set_time_limit (24 * 60 * 60);
    if (!isset($_POST['submit'])) die();
    // folder to save downloaded files to. must end with slash
    $destination_folder = ’./’;
    $url = $_POST['url'];
    $newfname = $destination_folder . basename($url);
    $file = fopen ($url, ”rb”);
    if ($file) {
    $newf = fopen ($newfname, ”wb”);
    if ($newf)
    while(!feof($file))
    {
    fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );
    }
    }
    if ($file)
    {
    fclose($file);
    }
    if ($newf) {
    fclose($newf);
    echo ’OK,File has been downloaded!’;
    }
    ?>
然后在输入框输入你要下载的文件的地址就OK了
 
 
 
 | 
 |