从Google图片搜索结果中抓取数据

问题描述

我必须从Google抓取数据。

例如,此URL:

https://www.google.com/searchbyimage?&image_url=https://traum-deutung.de/wp-content/uploads/2016/04/traumdeutung-offener-sarg-symbol-768x768.jpg

但是当我抓取它并回显数据变量时,它只是向我显示了Google页面,如下所示:

this is the image after scraping

这是来自Google图片搜索的实际结果,但是我没有在我的PHP脚本中找到其代码

this is actual result from google image search but I didn't find its code in my php script

我为此使用的代码

 <?PHP
  require 'simple_html_dom.PHP';
  $link = $_GET['link'];
  if (!isset($link) || empty($link)) {
    echo "please provide a link". "<br> \n";
    echo "EXAMPLE : <br>";
    echo "example.com?link=HERE PUT IMAGE LINK";
    die();

    }

    $html = file_get_html('https://www.google.com/searchbyimage?&image_url='. $link);
    echo $html;
 ?>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)