<%
Server.ScriptTimeout = 120
function getHTTPPage(url)
on error resume next
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytes2BSTR(Http.responseBody)
set http=nothing
if err.number<>0 then err.Clear
end function
Function bytes2BSTR(vIn)
dim strReturn
dim i1,ThisCharCode,NextCharCode
strReturn = ""
For i1 = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i1,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i1+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i1 = i1 + 1
End If
Next
bytes2BSTR = strReturn
End Function
Function GetMid(txt,StrOne,StrTwo)
NumOne = Instr(txt,StrOne)
NumTwo = Instr(txt,StrTwo)
if NumOne=0 or NumTwo=0 Then GetMid="":Exit Function
GetMid = Mid(txt,NumOne+Len(StrOne),NumTwo-NumOne-Len(StrOne))
End Function
Dim htmSource
htmSource=Left(getHTTPPage("http://www.hunnu.edu.cn/hnsd/xnxw/"),10000)
Dim newArray,iArray
newArray = Split(htmSource,".htm' >")
%>
<table width="664" border="0" align="center" style="border-collapse:">
<%
For i=1 to 15
if i= ubound(newArray) Then exit for
%>
<tr>
<td align="left">
<img src="Images/home_tb.jpg" border="0">
<a href="ShowNews.Asp?id=<% =Right(newArray(i-1),14) %>" target="_blank"><%=Left(newArray(i),instr(newArray(i),"</TD>")-1)%></a>
</td>
</tr>
<%
Next
%>
</table>