(.*)<\/div>/isU',$page,$arr);
//echo '
'.print_r($arr[1]).'
';
//$tmp = explode("
" , $page);
//$content = $tmp[4].$tmp[5].$tmp[6];
$content = $arr[1][0].'
';
$rez = preg_match_all('/href="(.*)"/isU',$content,$arr);
//echo '
'.print_r($arr,1).'
';
foreach ($arr[1] as $el) {
//if (strpos($el, '/abitur') !== false) {
if (strpos($el, 'http') !== 0) {
//str_replace('/abitur', 'https://mkgtu.ru/abitur',$el);
$content = str_replace($el,'https://mkgtu.ru'.$el,$content);
}
}
//$content = $arr[1][0].'
';
//$content = preg_replace('/href="(?!http|#)/is', 'https:\/\/mkgtu.ru', $content, -1, $count);
//$content = str_replace('href="','href="https://mkgtu.ru',$content);
//$pos = strripos($content,'/abitur');
//echo substr_replace($content, 'https://mkgtu.ru',$pos,0)
echo $content;
?>
@endsection