Google网站管理员搜索控制台

时间:2016-01-29 10:15:23

标签: google-webmaster-tools

有谁知道您可以在哪里更改邮件所在的电子邮件地址?我无法在任何地方找到它!

我试过在google上查看,但它只是提醒我更改通知。不是通知电子邮件地址的去处。

1 个答案:

答案 0 :(得分:0)

    $search_console = new Google_Service_Webmasters($client);
    $site_list = $search_console->sites->listSites()->siteEntry;
    foreach ($site_list as $key => $list) {
      $url=$list->siteUrl;
      $request = new \Google_Service_Webmasters_SearchAnalyticsQueryRequest;
      $request->setStartDate('2015-01-01'); // startdate required
      $request->setEndDate( $end ? $end : date( 'Y-m-d', strtotime( 'now' ) ) );
      $dimensions[] = 'query';
      $request->setDimensions($dimensions);
      $options=array();
      $search=$request;
      try{
      $results = $service->searchanalytics->query($url, $search, $options )->getRows();
      foreach ( $results as $key => $result ) {
        $data[$key]['keywords']=$result->keys[0];
        $data[$key]['avg_position']=$result->position;
        $data[$key]['clicks']=$result->clicks;
        $data[$key]['ctr'] = $result->ctr;
        $data[$key]['impressions'] =  $result->impressions;
      }
      //Search console gor particular location data
      } catch(\Exception $e ) {
      echo '<pre>';
      echo $e->getMessage();
    }
    }