• λ我爱Aspx >> Asp.Net >> 用ASP编写下载网页中所有资源的程序
  • 用ASP编写下载网页中所有资源的程序

  • :aspxer  Դ:internet  :2007-5-15 20:47:26  ؼ:asp
  • Function bytes2BSTR(vIn)

    dim strReturn

    dim i,ThisCharCode,NextCharCode

    strReturn = ""

    For i = 1 To LenB(vIn)

    ThisCharCode = AscB(MidB(vIn,i,1))

    If ThisCharCode < &H80 Then

    strReturn = strReturn & Chr(ThisCharCode)

    Else

    NextCharCode = AscB(MidB(vIn,i+1,1))

    strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))

    i = i + 1

    End If

    Next

    bytes2BSTR = strReturn

    End Function

    function getFileName(byval filename)

    if instr(filename,"/")>0 then

    fileExt_a=split(filename,"/")

    getFileName=lcase(fileExt_a(ubound(fileExt_a)))

    if instr(getFileName,"?")>0 then

    getFileName=left(getFileName,instr(getFileName,"?")-1)

    end if

    else

    getFileName=filename

    end if

    end function

    function getHTTPstr(url)

    on error resume next

    dim http

    set http=server.createobject("MSXML2.XMLHTTP")

    Http.open "GET",url,false

    Http.send()

    if Http.readystate<>4 then exit function

    getHTTPstr=Http.responseBody

    set http=nothing

    if err.number<>0 then err.Clear

    end function

    Function CreateDIR(ByVal LocalPath) '建立目录的程序,如果有多级目录,则一级一级的创建

    On Error Resume Next

    LocalPath = Replace(LocalPath, "\", "/")

    Set FileObject = server.CreateObject("Scripting.FileSystemObject")

    patharr = Split(LocalPath, "/")

    Ҷƪл˵?
  • һƪ用ASP编程实现网络内容快速查找
    һƪASP程序性能测试报告