title: make a php curl with port number
body: <p>I'm trying to read <a href="http://free.freeshoutcast.com:39072/7.html" rel="nofollow">http://free.freeshoutcast.com:39072/7.html</a> this page, I tried this code,</p>
  
  <pre><code>&lt;?php
  function curl_get_file_contents($URL)
      {
          $c = curl_init();
          curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
          echo curl_getinfo($c, CURLINFO_HTTP_CODE);
          curl_setopt($c, CURLOPT_URL, $URL);
          $contents = curl_exec($c);
          echo curl_error($c);
          curl_close($c);
  
          if ($contents) return $contents;
              else return FALSE;
      }
  
  echo curl_get_file_contents("http://free.freeshoutcast.com:39072/7.html");
  ?&gt;
  </code></pre>
  
  <p>It's working on localhost but, not working on server (godaddy/shared hosting)</p>
  
  <ul>
  <li><p>curl is enabled</p></li>
  <li><p>getting "couldn't connect to host" error if I try to get a file with port number.</p></li>
  <li><p>curl_get_file_contents("http://www.google.com"); is working.</p></li>
  <li><p>tried curl_setopt($c, CURLOPT_PORT, "39072"); //same error.</p></li>
  </ul>
  
  <p>Where am I wrong?
  Thanks.</p>
  
  <hr>
  
  <p><strong>EDIT: I've solved this problem by using <a href="http://developer.yahoo.com/yql/" rel="nofollow">yql</a>, if it helps to somebody.</strong></p>