php的远程上传谁有

给个php的远程上传文件,研究研究
回复列表(6|隐藏机器人聊天)
  • @Ta / 2013-04-27 / /
    原理:
    <?php
    $url=$_GET['url'];
    $name=end(explode('/',$url));
    $txt=file_get_contents($url);
    file_put_contents($name,$txt);
    ?>
     
  • @Ta / 2013-04-27 / /
    搜索cai.php
  • @Ta / 2013-04-27 / /
  • @Ta / 2013-04-27 / /
    我怎么上传不了附件?
  • @Ta / 2013-04-27 / /
    url.php  远程上传加解压  不留压缩包在空间   具体看我帖
  • @Ta / 2013-04-27 / /
    <?php
    /*
    * Package: FTP Installer
    * Author: Achunk JealousMan
    * Email: achunk17@gmail.com
    * Site: http://7ko.in
    */
    error_reporting(0);
    ignore_user_abort(true);
    if(!class_exists('ZipArchive')) {
    die("调用ZipArchive类失败!");
    }
    function zipExtract ($src, $dest)
        {
            $zip = new ZipArchive();
            if ($zip->open($src)===true)
            {
                $zip->extractTo($dest);
                $zip->close();
                return true;
            }
            return false;
        }

    echo '<html><head><title>远程在线安装</title></head><body>';
    if (!isset($_GET['zip'])) {
    echo '<form method="get" action="?"><b>文件地址:</b><br /><input type="text" name="zip" value="http://"/><input type="submit" value="Install"/></form></body></html>';
    exit;
    }
    $RemoteFile = rawurldecode($_GET["zip"]);
    $ZipFile = "Archive.zip";
    $Dir = "./";

    copy($RemoteFile,$ZipFile) or die("无法复制文件 <b>".$RemoteFile);

    if (zipExtract($ZipFile,$Dir)) {
    echo "<b>".basename($RemoteFile)."</b> 成功解压文件到当前目录.";
    unlink($ZipFile);

    }
    else {
    echo "无法解压该文件 <b>".$ZipFile.".</b>";
    if (file_exists($ZipFile)) {
    unlink($ZipFile);
    }

    }
    echo '</body></html>';
    ?>
添加新回复
回复需要登录