I refer to the find function in the foreach condition — it works; In the iteration I am writing in order to look in depth in what has already been found - it gives an error that it does not find such a method. I entered the library itself and wrote public there near the find function, it does not help. What to change or add?
<?php include_once("simple_html_dom.php"); $html=new simple_html_dom(); $html->load_file(www.example.com); foreach ($html->find('div.article') as $article){ echo $article->find('img',0)->src; }
www.example.comwhat is actually written? and written as a string or without quotes? - Alexey Shimanskyfind- u_mulder methodfind()method. For example, in theScraping Slashdot!Quick Startsection on your own link. - neluzhin