PHP Cannot get the text from an URL (file_get_content, CURL did not work)
<p>I am trying to get the text from the following url. 
<a href="http://stp.stheadline.com/data/indexNewsMarquee.json" rel="nofollow">http://stp.stheadline.com/data/indexNewsMarquee.json</a></p>

<p>I have tried several methods but none of them worked. I am really desperate right now please help me and thanks in advance.</p>

<p>P.S. I have enabled <strong>allow_url_fopen</strong> in my ini.php already. 
P.S. I am using XAMPP v3.3.2 and PHP v5.6.23</p>

<p>the following are the codes that I have tried (and failed)</p>

<h1>CURL</h1>

<pre><code>$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $url);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
</code></pre>

<p>result: <strong>Empty string</strong></p>

<h1>file_get_contents</h1>

<pre><code>echo file_get_contents($url, true);
</code></pre>

<p>result: <strong>failed to open stream: HTTP request failed!</strong></p>

<h1>readfile</h1>

<pre><code>echo readfile($url)
</code></pre>

<p>result: <strong>output the address itself</strong></p>