Re: Want to upload images on different server

  •  04-22-2011, 12:00 PM

    Re: Want to upload images on different server

    Dear chintanshah,
     
    After the following highlighted code are executed, files will be uploaded to destination folder on same server, you can handle those files and move them to other server, you can refer to  http://www.frihost.com/forums/vt-49107.html 
     
    <?php require_once "phpuploader/include_phpuploader.php" ?>
    <html>
    <body>
    <form id="form1" method="POST">
    <?php
    $uploader=new PhpUploader();
    $uploader->Name="myuploader";
    $uploader->Render();
    ?>
    </form>
    <?php
    //Gets the GUID of the file based on uploader name
    $fileguid=@$_POST["myuploader"];
    if($fileguid)
    {
    //get the uploaded file based on GUID
    $mvcfile=$uploader->GetUploadedFile($fileguid);
    if($mvcfile)
    {
    //Gets the name of the file.
    echo($mvcfile->FileName);
    //Gets the temp file path.
    echo($mvcfile->FilePath);
    //Gets the size of the file.
    echo($mvcfile->FileSize);

    //Copys the uploaded file to a new location.
    $mvcfile->CopyTo("/uploads");
    //Moves the uploaded file to a new location.
    $mvcfile->MoveTo("/uploads");
    //Deletes this instance.
    $mvcfile->Delete();
    }
    }
    ?>
    </body>
    </html>
     
    Thank you for asking
     
     
     
     
View Complete Thread