<%
' ', ' ' ', ' ', ' ', ' ', ' ', ' ' ' ' ' "" "" "", "" "," "," "", "", "", "" strtext " Strstartag for the beginning of the content to be cut "'" "" "" "" "' Strendtag" for the end of the content to be cut "" ' "'
'" ' GetText return value is cut out of the content ' "'" ' "' '
' ' ', ' ' ' ' ' ' ' ' ' ' ' annotation ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' Intstart
Intstart = InStr (StrText, Strstarttag)
If Intstart then
Intstart = Intstart + len (strstarttag)
intend = InStr (Intstart, StrText, strendtag)
GetText = Mid (StrText, Intstart, Intend-intstart)
Else
GetText = " "
End If
End Function
%>
<%
' ', ' ' ' Broken Sword Annotation ' ', ' ' ' ' ' ' ' ' "' Path is the address of the Web page to be read '
'" '. "" "' gethttppage return read the content of the Web page ' '
'", "" here should note gb2312 here, If the Read page encoding is
' gb2312, use gb2312, and if it is UTF-8, replace it with the UTF-8 ' '
' "' '" ' "', ' '" ' "'" ' "
T = getbody (Path)
Gethttppage=bytestobstr (t, "gb2312")
End Function
Function getbody (URL)
On Error Resume Next
Set retrieval = CreateObject ("Microsoft.XMLHTTP")
with Retrieva L
. Open "Get", url, False, "", ""
. Send
GetBody =. Responsebody
End With
Set retrieval = no
End Function
function bytestobstr (body,cset)
Dim objstre Am
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 = no
end Function
%>