Want to upload images on different server

Last post 04-22-2011, 12:00 PM by Eric. 1 replies.
Sort Posts: Previous Next
  •  04-22-2011, 2:32 AM 67291

    Want to upload images on different server

    Can any one help me for my issue??
     
    i want to upload images on different server.
    for that i did just following change,
     
    $uploader->UploadUrl="http://abc.def.com/brokerAdmin/photoUploadHandler.php"; 
     
    and that machine i have copy this file as well as phpuploader folder.
    but it doesn't work :(.
    and giving me following error. 
     
    i m getting following error. 
  •  04-22-2011, 12:00 PM 67296 in reply to 67291

    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 as RSS news feed in XML