ASP 百度主动推送 ASP 百度主动推送代码范例

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

ASP 百度主动推送 ASP 百度主动推送代码范例

  2021-04-21 我要评论

范例代码

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

ASP百度主动推送需要上面2个ASP函数。

调用方法:

调用方法:

 baiduts=PostHTTPPage(http://data.zz.baidu.com/urls?site=www.qb5200.com&token=xxxxxxx,https:)

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们