How to upload a file into a server using code in another server using php?

Hi,
I am using a unlimited server for uploading some files but after using so many code , i am not able to achieve my goal.
So now i want i use my current server to php code and upload my files into another server, where limit will not be any issue.

Example.
Let’s say i have two server ( www.rajesh.com and www.rathor.com),

now i am using below code into www.rajesh.com


if (file_exists("http://www.rathor.com/demo/rajesh/" . $_FILES["uploadedfile"]["name"]))
	 {
      echo $_FILES["uploadedfile"]["name"] . " already exists. ";
    }
	 else
	  {
      move_uploaded_file($_FILES["uploadedfile"]["tmp_name"],
      "http://www.rathor.com/demo/rajesh/" . $_FILES["uploadedfile"]["name"]);
      echo "Stored in: " . "http://www.rathor.com/demo/rajesh/" . $_FILES["uploadedfile"]["name"];
    }

So i just want to know, is it possible to do?
if yes then how i can achieve this?

Thanks

One option would be to FTP to the other server.

Check out: http://www.php.net/manual/en/function.ftp-put.php

FTP can be a little bit of a pain in PHP, let alone setting up the ftp server, permissions, etc. Exposing a rest service / script is another option.

hi,
By using ftp also i am not able to upload files, may be the reason that first it will upload in current server then it will move.
and the current server not allowing me to upload more than 20MB.

Thanks