Dom LoadHTML Problem in PHP

nik2121

New Member
Maybe I am missing something... but the DOM Object is empty in this code:\[code\]$input = file_get_contents('http://www.google.com/');$doc = new DOMDocument();@$doc->loadHTML($input); //supress errors on invalid html!var_dump($doc);die();\[/code\]I really don't know what could be wrong with that code. I have verified that $input is actually filled with the html contents of the web page.The output is: object(DOMDocument)#3 (0) { }I don't understand why...
 
Back
Top