home *** CD-ROM | disk | FTP | other *** search
- 'check if php version
- 'not older than 4.3.8
-
- Function Main
- Dim i As Integer
- Dim objHTTP As Object
- Dim varHTTPResponse As Variant
- Dim objRegexp As Object
- Dim bResult As Boolean
- Dim objHeaders As Object
-
-
- ip = getparameter("ComputerIP")
- port = 80
-
- bResult = false
-
- cr = Chr(13) + Chr(10)
-
- Set objRegexp = CreateObject("Vbscript.regexp")
- objRegexp.ignorecase = true
-
- Set objHTTP = HTTP.Connect (ip,port)
-
- objHTTP.GetURL ("/")
- objHTTP.Authentication = 1
-
- objHTTP.verb = "HEAD"
- ' Send the HEAD request
- varHTTPResponse = objHTTP.SendRequest ()
-
- Set objHeaders = objHTTP.ResponseHeaders
-
- objRegexp.pattern = ".*PHP/4\.3\.[0-7][^0-9]"
- If objRegexp.test (objHeaders.HeaderValue("Server")) Then
- bResult = true
- Else
- objRegexp.pattern = ".*PHP/([0-3]\.|4\.[0-2]\.|4\.3\.[0-7][^0-9])"
- If objRegexp.test (objHeaders.HeaderValue("X-Powered-By")) Then
- bResult = true
- End If
- End If
-
-
- main=bResult
-
- End Function
-