facebook twitter hatena line email

「Php/pubsubhubbub」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(PubSubHubBubとは)
行15: 行15:
 
     print_r($p->last_response());
 
     print_r($p->last_response());
 
  }
 
  }
 +
 +
==実行後検証==
 +
0秒でgooglebotがやってくる(UserAgent:FeedFetcher-Google)
 +
66.249.79.121 - - [20/Feb/2016:14:38:08 +0900] "GET /article/1432 HTTP/1.1" 200 10597 "-" "FeedFetcher-Google; (+http://www.google.com/feedfetcher.html)" "-"
  
 
==参考==
 
==参考==
 
https://syncer.jp/how-to-use-pubsubhubbub
 
https://syncer.jp/how-to-use-pubsubhubbub

2016年2月20日 (土) 05:42時点における版

PubSubHubBubとは

検索エンジンへの記事高速インデックス登録ライブラリ

ダウンロード

git clone https://github.com/joshfraser/pubsubhubbub-php

サンプル

require_once __DIR__ . '/pubsubhubbub-php/library/publisher.php';
$p = new Publisher("http://pubsubhubbub.appspot.com/");
$url = "http://wiki.nonip.info/index.php/Php/pubsubhubbub";
if ($p->publish_update($url)) {
   echo '成功';
} else {
   echo '失敗';
   print_r($p->last_response());
}

実行後検証

0秒でgooglebotがやってくる(UserAgent:FeedFetcher-Google)

66.249.79.121 - - [20/Feb/2016:14:38:08 +0900] "GET /article/1432 HTTP/1.1" 200 10597 "-" "FeedFetcher-Google; (+http://www.google.com/feedfetcher.html)" "-"

参考

https://syncer.jp/how-to-use-pubsubhubbub