Reputation: 1
Using file_get_contents I get the wrong page. I am sending a request with a header to the page https://soccer365.ru/games/1906341 /, and I get https://soccer365.ru/games/1906388/
How do I get exactly the page without a redirect?
$options = array(
'http' => array(
'method' => "GET",
'header' =>
"Accept-language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7\r\n" .
"Cache-Control:no-cache" .
"Pragma:" . rand(1,74628239) .
"Referer:https://soccer365.ru/" .
'Sec-Ch-Ua:"Opera";v="105", "Chromium";v="119", "Not?A_Brand";v="24"' .
"Sec-Ch-Ua-Mobile:?0" .
'Sec-Ch-Ua-Platform:"Windows"' .
"Sec-Fetch-Mode:no-cors" .
"Sec-Fetch-Site:cross-site" .
"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 OPR/105.0.0.0 (Edition Yx)"
)
);
$url_game_goals = file_get_contents("https://soccer365.ru/games/1906341/" . $value_games . "/", false, $context);
echo $url_game_goals;
Using file_get_contents I get the wrong page. I am sending a request with a header to the page https://soccer365.ru/games/1906341 /, and I get https://soccer365.ru/games/1906388/
Upvotes: 0
Views: 212