ASP Ping通知Feed烧制中心更新

ping,操作系统里基本的一个小工具,正宗的解释是“用来侦测网络上的远端主机是否存在,并判断网络状况是否正常的网络侦测工具”。

这里提到的ping仅仅是一个对用户公开的简单的api,用户可以通过这个接口通知ping中心调度程序,由调度程序调控相关进程,检查用户提交的地址是否有新的输出,如果有新的内容则立即取回,并烧制。这对用户的feed来讲,可以做到快速的更新,而不用等待系统的调度,避免了一些feed长期不更新的问题。

简单来说,ping就是一个开放给用户用来检测feed源是否有更新的API应用。ping的应用已经非常广泛,诸如Wordpress、Z-Blog等程序都自带了Ping的功能

代码取自PJBLOG论坛,原为PJBLOG插件,看了下代码可以用在大多数的支持RSS输出的站点。

程序代码

Const PingContent="http://www.feedsky.com/api/RPC2|http://blog.yodao.com/ping/RPC2|http://api.my.yahoo.com/RPC2|http://blogsearch.google.com/ping/RPC2|http://www.xianguo.com/xmlrpc/ping.php|http://www.zhuaxia.com/rpc/server.php"

Function SendPing

Dim Url,Urls
Urls=Split(Replace(PingContent,vbCr,""),"|")

For Each Url In Urls
If Trim(Url)<>"" Then
Call SendPing_Single(url)
End If
Next

End Function

Function SendPing_Single(url)

On Error Resume Next

Dim s,sUrl
'此处需要修改为自定义的生成网址
If blog_postFile = 2 Then
sUrl = siteURL&"article/"&postLog(2)&".htm"
else
sUrl = siteURL&"default.asp?id="&postLog(2)
end if
s = "<?xml version=""1.0""?><methodCall><methodName>weblogUpdates.ping</methodName><params><param><value>"&SiteName&"</value></param><param><value>"&sUrl&"</value></param></params></methodCall>"

Response.Write "<p>发送Ping到:" & Url & "</p>"
Response.Flush

Dim objPing
Set objPing = Server.CreateObject("MSXML2.ServerXMLHTTP")
objPing.SetTimeOuts 10000, 10000, 10000, 10000
'第一个数值:解析DNS名字的超时时间10秒
'第二个数值:建立Winsock连接的超时时间10秒
'第三个数值:发送数据的超时时间10秒
'第四个数值:接收response的超时时间10秒

objPing.open "POST",url,False

objPing.setRequestHeader "Content-Type", "text/xml"
objPing.send s

Set objPing = Nothing

Err.Clear

End Function

Call SendPing




http://blogsearch.google.com/ping/RPC2
http://ping.baidu.com/ping/RPC2
http://www.feedsky.com/api/RPC2
http://rpc.technorati.com/rpc/ping
http://rpc.weblogs.com.RPC2
http://ping.blog.gs/
http://api.my.yahoo.com/RPC2
http://ping.feedburner.com
http://api.moreover.com/RPC2
http://bblog.com/ping.php
http://bulkfeeds.net/rpc
http://ping.bitacoras.com
http://ping.bloggers.jp/rpc/
http://ping.blogmura.jp/rpc/
http://ping.myblog.jp
http://ping.syndic8.com/xmlrpc.php
http://ping.weblogalot.com/rpc.php
http://pinger.blogflux.com/rpc/
http://rpc.blogbuzzmachine.com/RPC2
http://rpc.blogrolling.com/pinger/
http://rpc.pingomatic.com/
http://rpc.tailrank.com/feedburner/RPC2
http://services.newsgator.com/ngws/xmlrpcping.aspx
http://topicexchange.com/RPC2
http://www.blogdigger.com/RPC2
http://www.blogoon.net/ping/
http://www.blogpeople.net/servlet/weblogUpdates
http://www.holycowdude.com/rpc/ping/
http://1470.net/api/ping
http://api.feedster.com/ping
http://api.moreover.com/ping
http://api.my.yahoo.com/rss/ping
http://bitacoras.net/ping
http://blog.goo.ne.jp/XMLRPC
http://blogdb.jp/xmlrpc
http://blogmatcher.com/u.php
http://blogupdate.org/ping/
http://coreblog.org/ping/
http://mod-pubsub.org/kn_apps/blogchatt
http://ping.amagle.com/
http://ping.blo.gs/
http://ping.blogg.de/
http://ping.cocolog-nifty.com/xmlrpc
http://ping.exblog.jp/xmlrpc
http://ping.rootblog.com/rpc.php
http://ping.weblogs.se/
http://pingoat.com/goat/RPC2
http://pingqueue.com/rpc/
http://rcs.datashed.net/RPC2/
http://rpc.britblog.com/
http://rpc.icerocket.com:10080/
http://rpc.newsgator.com/
http://rpc.wpkeys.com/
http://signup.alerts.msn.com/alerts-PREP/submitPingExtended.doz
http://trackback.bakeinu.jp/bakeping.php
http://www.a2b.cc/setloc/bp.a2b
http://www.bitacoles.net/ping.php
http://www.blogoole.com/ping/
http://www.blogroots.com/tb_populi.blog?id=1
http://www.blogshares.com/rpc.php
http://www.blogsnow.com/ping
http://www.blogstreet.com/xrbin/xmlrpc.cgi
http://www.imblogs.net/ping/
http://www.lasermemory.com/lsrpc/
http://www.mod-pubsub.org/kn_apps/blogchatter/ping.php
http://www.newsisfree.com/RPCCloud
http://www.newsisfree.com/xmlrpctest.php
http://www.popdex.com/addsite.php
http://www.snipsnap.org/RPC2
http://www.weblogues.com/RPC/
http://xmlrpc.blogg.de
http://xping.pubsub.com/ping/
https://phobos.apple.com/WebObjects/MZFinance.woa/wa/pingPodcast
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值