【问题标题】:Retriving more than 100 results using Simple HTML DOM使用简单 HTML DOM 检索 100 多个结果
【发布时间】:2016-02-17 23:01:22
【问题描述】:

我使用以下代码从“PHP Simple HTML DOM”中提取搜索结果

$url  = "http://www.google.com/search?      hl=en&safe=active&tbo=d&site=&source=hp&q={'$query'}&oq={'$query'}";

$html = file_get_html($url);
$linkObjs = $html->find('h3.r a');

但它返回最多 10 个结果是不是要从搜索中检索 100 个结果? 谢谢

【问题讨论】:

  • 我的回答解决了你的问题吗?如果是,你为什么不接受呢?

标签: simple-html-dom information-retrieval


【解决方案1】:

像这样在 url 中使用 num=100 参数

$url  = "http://www.google.com/search?hl=en&safe=active&tbo=d&site=&source=hp&num=100&q={'$query'}&oq={'$query'}";

【讨论】:

    猜你喜欢
    • 2016-10-03
    • 2012-10-11
    • 2014-10-04
    • 2014-12-07
    • 2017-07-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多