【发布时间】:2015-03-31 10:10:00
【问题描述】:
我有可以从特定 url/网页中找到单词的代码
$homepage = file_get_contents('http://www.example.com/furniture');
if (preg_match("/Sofa /i", "$homepage")) {
echo "A match was found.";
} else {
echo "A match was not found.";
}
我想知道的是,是否可以从整个网站 www.example.com 动态获取关键字“沙发”及其相关详细信息,例如类型和成本
【问题讨论】:
-
请贴一个“类型和成本”的例子,没有真实的例子很难提供帮助。
标签: php preg-match file-get-contents