How can I parse a website with PHP?
dom, parsing, php
Solution
you can't use your this code in your website you can do it if you use this link http://php.net/manual/en/book.dom.php
Problem
I want to make a website with news just like my other site appears on the Internet. I haven't got enough content. So I want to get content from another news website (Of course, I got permission to copy their content from their site). For this I used Simple HTML DOM, and it's progressing very well on my other site, but as I apply my script on the release site, it doesn't work (outputs nothing). Here is the link I want to get the data from: hesspress.com. Code: ``` require_once 'simple_html_dom.php'; $lien='http://www.hesspress.com'; $html=new simple_html_dom(); $html->load_file($lien); $k=$html->find('a',0)->href; print_r($k); ```