title: Curl returns Failed connect to <url>:80
body: <p>I am using <a href="https://php.net/curl" rel="nofollow">Curl</a> for the first time in PHP. Here is my code.</p>
  
  <pre><code>&lt;?php
      function curl($url){
          $ch = curl_init();
          curl_setopt($ch, CURLOPT_URL, $url);
          curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
          $data = curl_exec($ch);
          echo curl_getinfo($ch) . '&lt;br/&gt;';   //returns "Array"
          curl_errno($ch) . '&lt;br/&gt;';    // returns "7"
          curl_error($ch) . '&lt;br/&gt;';    //returns "Failed connect to www.epcc.ed.ac.uk:80; No error"
          curl_close($ch);
          return $data;
          }
  
  
          $url = 'http://www.epcc.ed.ac.uk/education-training/general-training/upcoming-courses-and-events/';
          $output = curl($url);
          var_dump($output);  // returns "bool(false)"
  ?&gt;
  </code></pre>
  
  <p>I have added the output what I get in comments in the code. </p>
  
  <p>Can anyone tell me where is the problem? Is it a general issue or any proxy issue.</p>
  
  <p>Thanks</p>