title: PHP - cURL Get response body
body: <p>How can I print the response content from an URL because preview is empty</p>
  
  <pre><code>    $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); 
      curl_setopt($ch, CURLOPT_HEADER, 0);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($ch, CURLOPT_REFERER, $ref);
      curl_setopt($ch, CURLOPT_COOKIEJAR, cookie.txt');
      curl_setopt($ch, CURLOPT_COOKIEFILE, cookie.txt');
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
      curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1");
      curl_setopt($ch, CURLOPT_POST, 1);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
      $output = curl_exec($ch);
      curl_close($ch);
  </code></pre>
  
  <p>Picture:</p>
  
  <p><img src="https://i.stack.imgur.com/QHFxQ.jpg" alt=""></p>