$doc = new DOMDocument('1.0', 'UTF-8'); // load the string into the DOM (this is your page's HTML), see below for more info $doc->loadHTMLFile ('https://www.civilprotection.gr/el'); // since we are working with HTML fragments here, remove removeChild($doc->firstChild); // remove and any junk $div = $doc->getElementById('block-views-dayly-map-view-block'); $doc->replaceChild($div, $doc->firstChild); // now, you can get any portion of the html (target a div, for example) using familiar DOM methods //$div = $doc->getElementById('block-views-dayly-map-view-block'); //$img = $div.child // echo the HTML (or desired portion thereof) die($doc->saveHTML());