 <p>Try using the CURLOPT_RETURNTRANSFER option:</p> <pre><code> $ch = curl_init(); $url = complete url of get request that works when directly placed into adress bar curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $data = curl_exec ($ch); curl_close ($ch); echo $data; </code></pre>