关于pubhubsubbub求教程,google的

[复制链接]
查看: 504   回复: 5
发表于 2013-11-20 18:16:37 | 显示全部楼层 |阅读模式
最近发的一些第三方的blog,感觉收录都很慢。
看到坛里有人讲到pubhubsubbub,说这个收录快。所以求教一下,看看有没有实操过的,分享一下。T币大大地有。



发表于 2013-11-21 19:50:55 | 显示全部楼层
对gg来说和ping差不多,好的第三方基本都已经pubhubsubbub了,没收录估计是质量不行


评分

参与人数 1T币 +1 收起 理由
yiyunet + 1 送花花~~~

查看全部评分

回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-11-22 09:24:10 | 显示全部楼层
不会用pubhubsubbub。有实践的来点介绍吧
回复 支持 反对

使用道具 举报

发表于 2013-11-22 14:10:09 | 显示全部楼层
yiyunet 发表于 2013-11-22 09:24 关于pubhubsubbub求教程,google的
不会用pubhubsubbub。有实践的来点介绍吧
  1. function http_post($url, $post_string) {
  2.     $options = array(CURLOPT_URL => $url,
  3.                      CURLOPT_POST => true,
  4.                      CURLOPT_POSTFIELDS => $post_string,
  5.                      CURLOPT_RETURNTRANSFER => true,
  6.                      CURLOPT_RETURNTRANSFER => true,
  7.                      CURLOPT_USERAGENT => "PubSubHubbub-Publisher-PHP/1.0");
  8.     $ch = curl_init();
  9.     curl_setopt_array($ch, $options);
  10.     $response = curl_exec($ch);
  11.     $info = curl_getinfo($ch);
  12.     curl_close($ch);
  13.     // all good
  14.     if ($info['http_code'] == 204)
  15.       return true;
  16.     return false;
  17. }
  18. function Publisher($topic_url){
  19.     $hub_urls=array('http://pubsubhubbub.appspot.com/','http://pubsubhubbub.superfeedr.com/','http://superfeedr.com/hubbub');
  20.     $post_string = "hub.mode=publish";
  21.     $post_string .= "&hub.url=".urlencode($topic_url);
  22.     foreach ($hub_urls as $hub_url) {
  23.         http_post($hub_url,$post_string);
  24.     }
  25. }
复制代码
以前从wp插件中扣的代码,3个pub源


评分

参与人数 1T币 +1 收起 理由
yiyunet + 1 送花花~~~

查看全部评分

回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-11-22 16:24:29 | 显示全部楼层
我们发布的外链可以通过pubsubhubbub提交吗?
回复 支持 反对

使用道具 举报

发表于 2013-11-22 19:38:38 | 显示全部楼层
这个真够绕口的。                 
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则