Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
PHP File Uploader
»
Re: Want to upload images on different server
Re: Want to upload images on different server
04-22-2011, 12:00 PM
Eric
Joined on 08-05-2009
Posts 1,269
Re: Want to upload images on different server
Reply
Quote
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
[email protected]
View Complete Thread