title: Using ip address in ftp_connect
body: <p>I am trying to connect to a server which doesn't have any domain name like 'abc.com'. Rather I have to access it through its IP address.
  I tried using ftp here, but the ftp_connect() doesn't support IP address.
  Following is the code that I have tried..</p>
  
  <pre><code>&lt;?php 
  echo $ftp_server="182.8.87.89"; 
  $ftp_user_name=""; 
  $ftp_user_pass=""; 
  $file = "new.txt";//tobe uploaded 
  $remote_file = "test/heelo.txt"; 
  
  // set up basic connection
  
  $conn_id = ftp_connect($ftp_server); 
  //echo 21;
  // login with username and password 
  echo $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass) or die(); 
  
  // upload a file 
  if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) { 
  echo "successfully uploaded $file\n"; 
  exit; 
  } else { 
  echo "There was a problem while uploading $file\n"; 
  exit; 
  } 
  // close the connection 
  ftp_close($conn_id); 
  </code></pre>
  
  <p>The error that I get is<code>Warning: ftp_login() expects parameter 1 to be resource, boolean given in      C:\xampp\htdocs\te\seperateupload.php on line 26</code>.</p>