1. Download the following text file and change .TXT to remote.asp, there are specific settings methods.
The code copy is as follows:
<%
'Whether to save remote pictures when adding resources
ConstsSaveFileSelect=True
'Remote image save directory, please do not add "/" at the end
ConstsSaveFilePath="/images/News"
'Remote image saving type
ConstsFileExt="jpg|gif|bmp|png"
'///////////////////////////////////////////////////////////////////////////////////
'Function: Replace the remote file in the string as a local file and save the remote file
'parameter:
'sHTML: string to replace
'sSavePath: The path to save the file
'sExt: Execute replacement extension
FunctionReplaceRemoteUrl(sHTML,sSaveFilePath,sFileExt)
Dims_Content
s_Content=sHTML
IfIsObjInstalled("Microsoft.XMLHTTP")=Falsethen
ReplaceRemoteUrl=s_Content
ExitFunction
EndIf
Dimre, RemoteFile, RemoteFileurl, SaveFileName, SaveFileType, arrSaveFileNameS, arrSaveFileName, sSaveFilePaths
Setre=newRegExp
re.IgnoreCase=True
re.Global=True
re.Pattern="((http|https|ftp|rtsp|mms):(///////){1}((/w)+[.]){1,}(net|com|cn|org|cc|tv|[0-9]{1,3})(/S*//)((/S)+[.]{1}("&sFileExt&")))"
SetRemoteFile=re.Execute(s_Content)
ForEachRemoteFileurlinRemoteFile
SaveFileType=Replace(Replace(RemoteFileurl,"/","a"),":","a")
arrSaveFileName=Right(SaveFileType,12)
sSaveFilePaths=sSaveFilePath&"/"
SaveFileName=sSaveFilePaths&arrSaveFileName
CallSaveRemoteFile(SaveFileName,RemoteFileurl)
s_Content=Replace(s_Content,RemoteFileurl,SaveFileName)
Next
ReplaceRemoteUrl=s_Content
EndFunction
'///////////////////////////////////////////////////////
'Function: Save remote files to local
'Parameter: LocalFileName------local file name