$dom = new DOMDocument(); $dom->loadHTMLFile('https://www.google.com/search?q=newyork'); echo $dom->saveHTML();