Answer the question
In order to leave comments, you need to log in
File_get_contents for some reason changes the address, because of what?
Hello ! I am making a page parser - soccer365.ru/games/11461852 via preg_match_all. This is the penultimate game between Roma and Liverpool. You need to get all the body of the page. But for some reason the function gives out the data of the last game, i.e. the data of a completely different page - soccer365.ru/games/911269/. I don't understand why at all. Please help.
$html5 = file_get_contents( 'http://soccer365.ru/games/11461852/' );
preg_match_all( '#<body>(.+?.)</body>#is', $html5, $matches );
foreach ( $matches[1] as $key=>$value8 ) {
${'K' . $key} = $value8;
echo "$value8<BR>";
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question