亚洲AV日韩AⅤ综合手机在线观看,激情婷婷久久综合色,欧美色五月婷婷久久,久久国产精品99久久人人澡

  • <abbr id="uk6uq"><abbr id="uk6uq"></abbr></abbr>
  • <tbody id="uk6uq"></tbody>
  • 如何利用XMLHTTP檢測URL及探測服務器信息

    時間:2023-04-06 01:53:01 筆試經(jīng)驗 我要投稿
    • 相關推薦

    如何利用XMLHTTP檢測URL及探測服務器信息

      利用XMLHTTP檢測或監(jiān)測URL,確認某個網(wǎng)頁或網(wǎng)站是否可以正常訪問?

      如何利用XMLHTTP探測服務器信息?檢測網(wǎng)頁

      Microsoft XML Version 2.0 (C:WinntSystem32msxml.dll)

      Option Explicit

      Private XmlHTTP As New XMLHTTPRequest

      Private vUrl As String

      Private vNumber As String

      Private vDescription As String

      Private vSource As String

      Public Sub Connect()

      On Error GoTo ErrorHandle:

      XmlHTTP.Open \”Get\”, Url, False

      XmlHTTP.send

      ErrorHandle:

      Call GetErrorHeadle(XmlHTTP)

      End Sub

      Private Sub GetErrorHeadle(ByRef XmlHTTP As XMLHTTPRequest)

      If XmlHTTP.readyState <> 4 Then

      Exit Sub

      End If

      If XmlHTTP.Status = 404 Then

      Number = \”404\”

      Description = \”該網(wǎng)頁不存在\”

      ElseIf XmlHTTP.Status < 200 Then

      Number = XmlHTTP.Status

      Description = \”客戶端錯誤,信息:\” & CStr(XmlHTTP.Status) & \” \” & XmlHTTP.statusText

      ElseIf XmlHTTP.Status < 300 Then

      Number = XmlHTTP.Status

      Description = \”成功,該網(wǎng)頁能訪問。\”

      ElseIf XmlHTTP.Status < 400 Then

      Number = XmlHTTP.Stauts

      Description = \”重定向,信息:\” & CStr(XmlHTTP.Status) & \” \” & XmlHTTP.statusText

      ElseIf XmlHTTP.Status < 500 Then

      Number = XmlHTTP.Status

      Description = \”客戶端錯誤,信息:\” & CStr(XmlHTTP.Status) & \” \” & XmlHTTP.statusText

      ElseIf XmlHTTP.Status < 600 Then

      Number = XmlHTTP.Status

      Description = \”服務器錯誤,信息:\” & CStr(XmlHTTP.Status) & \” \” & XmlHTTP.statusText

      Else

      Number = XmlHTTP.Status

      Description = \”域名不可用或網(wǎng)絡連接錯誤,信息:\” & CStr(XmlHTTP.Status) & \” \” & XmlHTTP.statusText

      End If

      If XmlHTTP.Status < 600 Then Call GetHTTPServer

      End Sub

      Private Sub GetHTTPServer()

      Dim XmlServer As String

      XmlServer = XmlHTTP.getResponseHeader(\”Server\”)

      If XmlServer <> \”\” Then

      Source = Source & \”HTTP服務器:\” & XmlServer

      End If

      Source = Source & \”所有反饋信息:\” & XmlHTTP.getAllResponseHeaders

      End Sub

      Public Property Get Number() As String

      Number = vNumber

      End Property

      Public Property Let Number(ByVal Val As String)

      vNumber = Val

      End Property

      Public Property Get Description() As String

      Description = vDescription

      End Property

      Public Property Let Description(ByVal Val As String)

      vDescription = Val

      End Property

      Public Property Get Url() As String

      Url = vUrl

      End Property

      Public Property Let Url(ByVal Val As String)

      vUrl = Val

      End Property

      Public Property Get Source() As String

      Source = vSource

      End Property

      Private Property Let Source(ByVal Val As String)

      vSource = Val

      End Property

    【如何利用XMLHTTP檢測URL及探測服務器信息】相關文章:

    在英語教學中如何利用信息技術03-16

    淺析如何利用信息技術課培養(yǎng)學生信息素養(yǎng)11-14

    基于手機探測器的交通信息探測系統(tǒng)研究11-24

    如何利用非信息技術為教學添加活力11-21

    信息檢索與利用論文01-01

    如何利用職場創(chuàng)業(yè)12-09

    如何利用啞鈴健身09-16

    如何利用簡歷模板05-18

    高中數(shù)學課堂如何合理利用信息技術03-27

    如何有效利用網(wǎng)絡學習12-29