全國服務熱線13292823610
石家(jiā)莊浩析網絡科(kē)技有限公司
聯 系 人:郭經理
咨詢電話:13292823610
客服QQ:281839695
電子(zǐ)郵箱:281839695@qq.com
官方網址:
現在用ASP的少了,但還是有人在用啊,其實語言并沒什麼大(dà)的區别弟行,功能都能實現,今天分享一個百度推送代碼,有利于網站内容的收錄。
function BytesToBstr(body,Cset)&nb飛員sp;
dim objstream
set objstream = Server.Create店對Object("adodb.stream&qu雨房ot;)
objstream.Type = 1
objstream.Mode =3 民舊
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2&n房爸bsp;
objstream.Charset = Cset
BytesToBstr = objstream購水.ReadText
objstream.Close
set objstream = nothing
End function
'===========================報紅=======================西術
function PostHTTPPage(url,data)&妹黃nbsp;
dim Http
set Http=server.createob間快ject("MSXML2.SE筆機RVERXMLHTTP.3.0")
Http.open "POST&qu業紙ot;,url,false
Http.setRequestHeader 學黑"CONTENT-TYPE&quo鐵物t;, "text/plain要看"
Http.send(data)
if Http.readystate<>4 then
exit function
End if
PostHTTPPage=bytesToBSTR(Http.responseB坐聽ody,"utf-8")&nb為到sp;
set http=nothing
if err.number<>0 then err.Cle公愛ar
End function
使用的話就是:
baiduts=PostHTTPPage("http://data.zz.baidu.com/urls?site=w這黑ww.sjzzwz.cn&toke通動n=xxxxxxx,https://www.sjzzwz.cn器月61.html")
Copyright © 2023 石家(jiā)莊浩析網絡科(kē)技有限城紅公司 做網站就找浩析網絡! &nbs車兵p;