') { $this->url = $url; $this->contentMarker = $contentMarker; } public function getHTML() { $page = file_get_contents($this->url); $strForPregMatch = "/" . "{$this->contentMarker}" . "(.*)<\/div>/is"; $arr = []; $rez = preg_match_all($strForPregMatch, $page, $arr); return $content = $arr[1][0]; } public function normalizeURLFile($content) { //$content = preg_replace('//isU',$content,$arr); foreach ($arr[1] as $el) { if (!str_contains($el, 'https://')){ $content = str_replace($el,'https://mkgtu.ru' . $el,$content); } } return $content; } }