百度实时推送 asp
来源:互联网 发布:淘宝店招制作 编辑:程序博客网 时间:2024/06/15 04:47
本来这个文章不太适合发这里的。因为我们这个是个游戏站点。但是想了想。助人是没有界限的,网站也肯定是没有界限的。所以思索在三还是发出这个教程吧!
准备工作
实时推送需要获得百度的资格,也就是说获得了sitemap权限(当然你都看了这个文章了,也就代表肯定有这个权限的)!
在获得资格的情况下。登陆站长平台,拿到接口调用地址
点这里的添加新数据
拿到这个调用接口地址后就做好准备工作了
开始部署代码
我们需要几个函数如下
function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End function
function PostHTTPPage(url,data)
dim Http
set Http=server.createobject("MSXML2.SERVERXMLHTTP.3.0")
Http.open "POST",url,false
Http.setRequestHeader "CONTENT-TYPE", "application/x-www-form-urlencoded"
Http.send(data)
if Http.readystate<>4 then
exit function
End if
PostHTTPPage=bytesToBSTR(Http.responseBody,"utf-8")
set http=nothing
if err.number<>0 then err.Clear
End function
Function tsxml(url)
tsxml="<urlset xmlns=""http://www.sitemaps.org/schemas/sitemap/0.9"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:schemaLocation=""http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"">" &_
"<url>"&_
" <loc>"&url&"</loc>"&_
"<lastmod>"&showtimes(split(rs("date")," ")(0))&"</lastmod>"&_
"<priority>0.7</priority>"&_
"</url>"&_
"</urlset><!--update by "&now()&"-->"
End Function
复制好后,在需要调用的文章哪里(就是你发布成功的地方调用参数)
示例如下
Call PostHTTPPage("http://ping.baidu.com/sitemap?site=wenwen.19yxw.com&resource_name=sitemap&access_token=TsrduoFe",tsxml("http://top.19yxw.com/Article/133.html"))
好了,如果搞不来,需要我帮忙的话可以加QQ:24722 由我来帮你弄。当然了,这个就需要付点费用了啊。毕竟也是需要花精力的。教程可以写,写了就不需要管。但是帮人的话就得额外占用自己的时间,付出了劳动理所当然需要取得回报!
- 百度实时推送 asp
- 百度实时推送代码 curl
- 实现百度sitemap实时推送
- nodejs实现百度实时推送
- 百度实时推送不需要本地ping提交
- Android 高仿微信实时聊天 基于百度云推送
- Android 高仿微信实时聊天 基于百度云推送
- Android 高仿微信实时聊天 基于百度云推送
- Android 高仿微信实时聊天 基于百度云推送2
- Android 高仿微信实时聊天 基于百度云推送
- Android 高仿微信实时聊天 基于百度云推送
- Android 高仿微信实时聊天 基于百度云推送
- Android 高仿微信实时聊天 基于百度云推送
- Android 高仿微信实时聊天 基于百度云推送
- Android 高仿微信实时聊天 基于百度云推送
- Android 高仿微信实时聊天 基于百度云推送
- Android 高仿微信实时聊天 基于百度云推送
- Android 高仿微信实时聊天 基于百度云推送
- Dcmtk在PACS开发中的应用
- UAP IDE 代码提示设置
- 搜索 - poj1753 Flip Game
- E Looper : WARNING: The Looper class instance count has over a limit(100). There should be some l
- C++ STL--stack/queue 的使用方法
- 百度实时推送 asp
- RFID第四次作业8-3
- 图像局部显著性—点特征
- android sax解析xml 文件 动态加载标题
- windows系统获取管理员权限脚本
- SSH三大框架整合需要的JAR包及大概作用 .
- 华为荣耀畅玩4如何root?
- 常见音频接口
- 3.4