title: why file_get_contents('external_url') is not working in cron job? Are there any alternate process?
body: <p>I created a php cron job, to fetch the Instagram feeds. My code is as follows..</p>
  
  <pre><code>$homepage = file_get_contents("https://api.instagram.com/v1/users/XXXXXX/media/recent?access_token=XXXXXXXXXX.XXXXXXX.XXXXXX&amp;count=8", false, stream_context_create($arrContextOptions)); $json = json_decode($homepage);
  </code></pre>
  
  <p>When I execute this code through web-browser, it was working fine.  But it was not executing from cron job.</p>
  
  <p>I am using cron job command line as follows..</p>
  
  <pre><code>cd /home/MY_SITE/public_html/content/insta/ &amp;&amp; php index.php &gt; /dev/null 2&gt;&amp;1
  </code></pre>
  
  <p>please help me.. Thanks.</p>