PostHttpPage用asp是實現(xiàn)模擬登錄效果的代碼
更新時間:2007年09月01日 22:04:28 作者:
'==================================================
'函數(shù)名:PostHttpPage
'作 用:登錄
'==================================================
Function PostHttpPage(RefererUrl,PostUrl,PostData)
Dim xmlHttp
Dim RetStr
Set xmlHttp = CreateObject("Msxml2.XMLHTTP")
xmlHttp.Open "POST", PostUrl, False
XmlHTTP.setRequestHeader "Content-Length",Len(PostData)
xmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlHttp.setRequestHeader "Referer", RefererUrl
xmlHttp.Send PostData
If Err.Number <> 0 Then
Set xmlHttp=Nothing
PostHttpPage = "$False$"
Exit Function
End If
PostHttpPage=bytesToBSTR(xmlHttp.responseBody,"GB2312")
Set xmlHttp = nothing
End Function
'函數(shù)名:PostHttpPage
'作 用:登錄
'==================================================
Function PostHttpPage(RefererUrl,PostUrl,PostData)
Dim xmlHttp
Dim RetStr
Set xmlHttp = CreateObject("Msxml2.XMLHTTP")
xmlHttp.Open "POST", PostUrl, False
XmlHTTP.setRequestHeader "Content-Length",Len(PostData)
xmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlHttp.setRequestHeader "Referer", RefererUrl
xmlHttp.Send PostData
If Err.Number <> 0 Then
Set xmlHttp=Nothing
PostHttpPage = "$False$"
Exit Function
End If
PostHttpPage=bytesToBSTR(xmlHttp.responseBody,"GB2312")
Set xmlHttp = nothing
End Function
相關(guān)文章
ASP 根據(jù)用戶權(quán)限判斷顯示的列標(biāo)題
通過session的屬性值判斷判斷顯示的列標(biāo)題2009-03-03非常好用的asp備份,還原SQL數(shù)據(jù)庫的代碼
用asp的朋友,可以用下面的代碼,實現(xiàn)mssql數(shù)據(jù)庫的備份還原操作2008-06-06ASP 時間函數(shù)及如何獲取服務(wù)器時間的寫法
本文羅列了一些常用的ASP時間函數(shù)以及如何獲取服務(wù)器時間的寫法,感興趣的朋友可以了解下,就當(dāng)鞏固知識了希望本文對你有所幫助2013-01-01