如何显示商店名称php?

时间:2017-01-17 09:56:13

标签: php

我想知道所有商店名称是如何显示在" http://www.mytokri.com/all-stores/"给定的链接。这里使用的是API还是工具或软件?

1 个答案:

答案 0 :(得分:0)

使用PHP Simple HTML DOM Parser的解决方案如下:

您可以从here

下载库
<?php
    include 'simple_html_dom.php';
    $url = "http://www.mytokri.com/all-stores/";    
    $html = file_get_html($url); // you don't need to use curl
    $yourDesiredContent = $html->find('div.store-listing', 0)->plaintext;
    print_r($yourDesiredContent); 
?>