1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
cd C:\xampp\php '<?php $url = "https://www.jesusninoc.com/2018/06/09/how-to-make-an-offline-mirror-copy-of-a-website-with-wsl-windows-subsystem-for-linux/"; $input = @file_get_contents($url) or die("Could not access file: $url"); $dom = new DOMDocument(); @$dom->loadHTML($input); $xpath = new DOMXPath($dom); $result = ""; foreach($xpath->evaluate(''//div[@class="crayon-plain-wrap"]'') as $childNode) { $result .= $dom->saveHtml($childNode); } echo $result; ?>' | .\php.exe |