title: Cannot connect with FTP server with PHP , ftp_connect()
body: <p>I was trying to connect with ftp server using ftp_connect() function of PHP as shown below: </p>
  
  <pre><code>&lt;?php
  
  $ftp_server = "http://ftp.mozilla.org/pub/mozilla.org/";
  
  $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); 
  
  ?&gt;
  </code></pre>
  
  <p>But it returns this error:</p>
  
  <blockquote>
    <p>Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses: getaddrinfo failed: No such host is known. in D:\wamp\www\ftp2.php on line 6</p>
  </blockquote>
  
  <p>Although this is a very common type of error, I still cannot find any solution. Can anyone provide some possible solutions?</p>
  
  <p>Thank you for your time.</p>