title: How to use file_get_contents in php
body: <p>I used to scrap a website for information using the file_get_contents command in PHP. Although now every time I try to go scrap the webpage it only returns</p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;&lt;meta http-equiv="Refresh" content="0; URL=http://website.com/latest.php?ckattempt=1"&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>This was the code that I had used that used to work</p>
  
  <pre><code>$opts = array(
      'http'=&gt;array(
          'method'=&gt;"GET",
          'header'=&gt;"Accept-language: en\r\n".
                    "Referer: ".$url."/index.php".
                    "Cookie: id=&lt;id token&gt;; auth=&lt;auth token&gt;;"
      )
  );
  $context = stream_context_create($opts);
  $html = file_get_contents($url.'/latest.php?ckattempt=0', false, $context);
  </code></pre>
  
  <p>I am assuming that it has to do with something dealing with the refresh meta tag, but does anyone know of any ways I could get around this by chance so I can scrap the webpage again?</p>