ASP 百度主动推送代码范例
程序员文章站
2022-06-15 14:17:25
范例代码functionbytestobstr(body,cset)dimobjstreamsetobjstream=server.createobject("adodb.stream")objstr...
范例代码
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.jb51.net&token=xxxxxxx,)
到此这篇关于asp 百度主动推送代码范例的文章就介绍到这了,更多相关asp 百度主动推送内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!