文章詳情頁
ASP 百度主動推送代碼范例
瀏覽:10日期:2022-06-04 18:22:10
范例代碼
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函數(shù)。
調(diào)用方法:
調(diào)用方法:
baiduts=PostHTTPPage(http://data.zz.baidu.com/urls?site=www.jb51.net&token=xxxxxxx,https://www.jb51.net/article/184256.htm)
到此這篇關(guān)于ASP 百度主動推送代碼范例的文章就介紹到這了,更多相關(guān)ASP 百度主動推送內(nèi)容請搜索以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持!
標(biāo)簽:
ASP
相關(guān)文章:
1. asp批量添加修改刪除操作示例代碼2. chat.asp聊天程序的編寫方法3. ASP.NET泛型三之使用協(xié)變和逆變實(shí)現(xiàn)類型轉(zhuǎn)換4. ASP基礎(chǔ)知識VBScript基本元素講解5. asp(vbscript)中自定義函數(shù)的默認(rèn)參數(shù)實(shí)現(xiàn)代碼6. asp.net core項(xiàng)目授權(quán)流程詳解7. asp知識整理筆記4(問答模式)8. ASP中格式化時(shí)間短日期補(bǔ)0變兩位長日期的方法9. asp讀取xml文件和記數(shù)10. 如何將asp.net core程序部署到Linux服務(wù)器
排行榜
