1.å¦ä½å®ç°asp å°å·ç¨åºï¼ï¼ï¼
2.ASP小偷程序 XML读取UTF-8 乱码求解
3.ASPå°å·ç¨åºçç¼å
å¦ä½å®ç°asp å°å·ç¨åºï¼ï¼ï¼
ä½ è¦çæ¯ç¸å½äºç½ç»èèè¿æ ·çåè½ãè¿æ ·çä¸è¥¿ç¨asp并ä¸å¥½åï¼å 为aspæ¯è¢«å¨æ§è¡çãä¸è½åçæ£çspiderç¨åºé£æ ·ä¸»å¨å°ä¸æééå«çç½ç«ãå¦æè¦å®ç°æå¨ééï¼æ¯å¦ä½ æå®æä¸ç½é¡µä¹åå°±æ该页ééä¸æ¥ãè¿åæ ·è¦ç¨å°ä¸é¢æ说çå°å·ç¨åºåçãå ç¨xml/",偷源易语言编辑器源码 "utf-8")
Function xmlHttp(sUrl, sCharSet)
On Error Resume Next
Dim xml: set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", sUrl, False
xml.setRequestHeader "Content-Type", "text/html;charset=" & sCharSet
xml.Send()
If Err.Number <> 0 Then
xmlHttp = ""
Exit Function
End If
If xml.readyState = 4 Then
xmlHttp = BytesToBstr(xml.responseBody, sCharSet)
End If
End Function
Function BytesToBstr(cnvUni, sCharSet)
On Error Resume Next
Dim objStream: set objStream = Server.CreateObject("adodb.stream")
With objStream
.Type = 1
.Mode = 3
.Open
.Write cnvUni
.Position = 0
.Type = 2
.Charset = sCharSet
BytesToBstr = .ReadText
.Close
End With
End Function
ASPå°å·ç¨åºçç¼å
ææè¿ä¹æ£å¨ç 究è¿ä¸ªä¸è¥¿ï¼æ¥¼ä¸»ççè¿æ®µç¨åºï¼æç¨è¿æ®µç¨åºæåè·åäºä¸å°ç½ç«çä¿¡æ¯ãå ·ä½å°ä¸åçç½ç«å¯è½ä¼æä¸äºå°çä¿®æ¹ï¼æ们å¯ä»¥ä¸èµ·è®¨è®ºã
<%
Dim Url,Content,awbno
Url = "ç½å"
awbno = Request.Form("awbno")
If awbno="" Or IsNull(awbno) Then
Content = GetData(Url,1)
Else
Content = PostData(Url&"return.asp","awbno=" & awbno,1)
End If
Content = Replace(Content,"images/",Url & "images/")
Content = Replace(Content,"return.asp","")
Response.Write Content
Function GetData(GetUrl,GetMode)
Dim Http
Set Http = Server.CreateObject("msxml2.XMLHTTP")
With Http
.Open "GET",GetUrl,False
.SetRequestHeader "Referer",GetUrl
.Send
If GetMode = 0 Then
GetData = .ResponseBody
Else
GetData = BytesToBstr(.ResponseBody,"GB")
End If
End With
Set Http = Nothing
End Function
Function PostData(PostUrl,PostStr,PostMode)
Dim Http
Set Http = Server.CreateObject("msxml2.XMLHTTP")
With Http
.Open "POST",PostUrl,False
.SetRequestHeader "Content-Length",Len(PostStr)
.SetRequestHeader "Content-Type","application/x-www-form-urlencoded"
.SetRequestHeader "Referer",PostUrl
.Send PostStr
If PostMode=0 Then
PostData = .ResponseBody
Else
PostData = BytesToBstr(.ResponseBody,"GB")
End If
End With
Set Http = Nothing
End Function
Function BytesToBstr(Body,Cset)
Dim ADOS
Set ADOS = Server.CreateObject("Adodb.Stream")
With ADOS
.Type = 1
.Mode =3
.Open
.Write Body
.Position = 0
.Type = 2
.Charset = Cset
BytesToBstr = .ReadText
.Close
End With
Set ADOS = Nothing
End Function
%>