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
<html><head><meta http-equiv="Refresh" content="0; URL=http://website.com/latest.php?ckattempt=1"></head><body></body></html>
This was the code that I had used that used to work
$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>"Accept-language: en\r\n".
"Referer: ".$url."/index.php".
"Cookie: id=<id token>; auth=<auth token>;"
)
);
$context = stream_context_create($opts);
$html = file_get_contents($url.'/latest.php?ckattempt=0', false, $context);
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?