title: PHP + cURL not working
body: <p>Trying to get the content of the a certain URL using cURL and PHP.
  The code is supposed to run on the  sourceforge.net project web hosting server.</p>
  
  <p>code:</p>
  
  <pre><code>&lt;?php
  
  function get_data($url)
  {
    $ch = curl_init();
    $timeout = 10;
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
  }
  
  $url1 = urlencode("http://www.google.com"); 
  $url2 = "http://www.google.com";
  $output = get_data($url2);
  echo $output;
  
  ?&gt;
  </code></pre>
  
  <p>I've checked that cURL is supported. But the above code is not working, the page is loading till timeout with no output. I've tried the encoded url as well. Why?</p>
  
  <p>Error <code>503 Service Unavailable</code>. PHP version 5.3.2</p>