title: remote file upload
body: <p>first , i am sorry for moderators for this more posts ,,</p>
  
  <p>i have in my control panel , upload files page</p>
  
  <p>but i want upload files on another server &lt;- i have two servers</p>
  
  <p>the first server control panel ( upload page ) url is</p>
  
  <p>first_server.com/admin/upload.php</p>
  
  <p>my second server link is </p>
  
  <p>files.second_server.com</p>
  
  <p>how i can upload files to the second server from the first server ?</p>
  
  <p>without redirect to the second server</p>
  
  <p>my first server content is - upload.php</p>
  
  <pre><code>&lt;form -- action=i dont know what i should set in action&gt;
  &lt;input name=myfile type=file&gt;
  &lt;input type=submit&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>the second server file is - proccess.php</p>
  
  <pre><code>if($_FILE['myfile']){
  move_uploaded_file.......
  //print the file link , to get it by my first page on first server
  echo $second_server_full_path . '/' . $_FILE['myfile']['name'];
  }
  </code></pre>
  
  <p>so .. how i can done this job via curl or file_get_content</p>
  
  <p>i think file_get_content will be fine .. but the max timeout is too low !</p>
  
  <p>Please help !</p>