首页 > 问答 > asp站长平台主动推送怎么设置,官方给出了代码,但是没操作步

asp站长平台主动推送怎么设置,官方给出了代码,但是没操作步

[导读]:asp版主动推送的设置 asp版相对比较复杂。这里我们需要2个函数 function BytesToBstr(body,Cset) dim objstream set objstream = Server.CreateObject("adodb.stream") objstream.Type = 1 objstream.Mode =3 objstream.O...

asp版主动推送的设置

asp版相对比较复杂。这里我们需要2个函数

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", "text/plain"
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
调用方法: baiduts=PostHTTPPage(http://data.zz.baidu.com/urls?site=www.xxx.com&token=xxxxxxx,"http://www.xxx.com/xxx/"&rs("id")&".html")

企业站效果不大,行业站不晓得

###

关于此问题,建议你看下这篇文章http://ask.seowhy.com/article/5032
希望对你有所帮助。

本文来自投稿,不代表微盟圈立场,如若转载,请注明出处:https://www.vm7.com/a/ask/37730.html