php - Simple crawl to website


I am trying to crawl a website . Will the below code is that efficient to get me the values which I listed


include 'simple_html_dom.php';

$target_url = "";
$html = new simple_html_dom();
foreach($html->find('Name') as $link){
echo $link."<br />";


Actaully I am trying to ftech Name , Address and location . COuld anybody please give me any idea on this.

Thanks in advance




By looking at the source code, try getting the contents of thediv with classaddress-tags then looping through the

tags and echoing the contents.

Try this to start with;

$dom = new DomDocument();
$xpath = new DomXpath($dom);
$div = $xpath->query('//*[@class="address-tags"]')->item(0);

People are also looking for solutions to the problem: php - How to change the url in codelginter


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.