title: How to use CURL instead of file_get_contents?
body: <p>I use <code>file_get_contents</code> function to get and show external links on my specific page.</p>
  
  <p>In my local file everything is okay, but my server doesn't support the <code>file_get_contents</code> function, so I tried to use cURL with the below code:</p>
  
  <pre><code>function file_get_contents_curl($url) {
      $ch = curl_init();
  
      curl_setopt($ch, CURLOPT_HEADER, 0);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($ch, CURLOPT_URL, $url);
  
      $data = curl_exec($ch);
      curl_close($ch);
  
      return $data;
  }
  
   echo file_get_contents_curl('http://google.com');
  </code></pre>
  
  <p>But it returns a blank page. What is wrong?</p>