title: How to get HTTP URL of file uploaded to FTP server
body: <p>Below is my code to upload file to other server ,</p>
  
  <pre><code>$ftp_server="host";
  $ftp_user_name="";
  $ftp_user_pass="";
  $file = "referesh.php";//tobe uploaded
  $name = "diff_adtaggeneration";
  $remote_file = $name."/referesh.php";
  
  // set up basic connection
  $conn_id = ftp_connect($ftp_server);
  
  // login with username and password
  $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
  
  $res = ftp_rawlist($conn_id, $name);
  //print_r($_SERVER);exit;
  if(count($res) &gt; 0)
  {
  
      ftp_put($conn_id, $remote_file, $file, FTP_ASCII);
  }
  else
  {
      ftp_mkdir($conn_id, $name);
      ftp_put($conn_id, $remote_file, $file, FTP_ASCII);
  }
  
  ftp_close($conn_id); 
  </code></pre>
  
  <p>above code works perfectly, the file succesfully uploaded to other server, the new folder name 'diff_adtaggeneration' will create in root of the directory and file uploaded in that folder, and I need to get the uploaded file path ..! I use <code>print_r($_SERVER)</code> , I know this shows only current server details, but how to get the root directory full file path of uploaded server(other server). Any help appreciated...</p>