This section uses ASPProgramThe function for obtaining the Remote File Size looks very simple. icech recommends you to learn:
<%
'-----------------------------------------------------------
'Function: Obtain the remote file size.
'Parameter: URL remote file address
'Return: Remote File size (unit: bytes)
'-----------------------------------------------------------
Function getremotefilesize (URL)
Dim XMLHTTP
Set XMLHTTP = server. Createobject ("msxml2.xmlhttp ")
XMLHTTP. Open "get", URL, false
'The next sentence is critical. Otherwise, the header information is returned only after all file information is preloaded.
XMLHTTP. setRequestHeader "range", "bytes =-1"
XMLHTTP. Send ()
Getremotefilesize = Split (XMLHTTP. getResponseHeader ("content-range"), "/") (1)
Set XMLHTTP = nothing
End Function
Response. Write (getremotefilesize ("http://js.tongji.cn.yahoo.com/ I .gif "))
%>