$sResponse = _HTTPGetResponse("creator-lab.ucoz.ru", "/Testing_Zone/Tester_zip.zip")
MsgBox(64, "Tester_zip.zip Hedaer", $sResponse)
$sLastModified = StringRegExpReplace($sResponse, "(?s).*Last-Modified: (.*?)[\r\n].*", "\1")
MsgBox(64, "Last Modified", $sLastModified)
Func _HTTPGetResponse($sHost, $sPage)
TCPStartup()
Local $sName_To_IP = TCPNameToIP($sHost)
Local $iSocket = TCPConnect($sName_To_IP, 80)
If $iSocket = -1 Then
TCPShutdown()
Return SetError(1, 0, "")
EndIf
Local $sCommand = "HEAD " & $sPage & " HTTP/1.1" & @CRLF
$sCommand &= "Host: " & $sHost & @CRLF
$sCommand &= "User-Agent: AutoIt/" & @AutoItVersion & " (Windows; U; Windows NT 5.1; en-US; rv:1.8.1)" & @CRLF
$sCommand &= "Referer: " & $sHost & @CRLF
$sCommand &= "Connection: close" & @CRLF & @CRLF
Local $BytesSent = TCPSend($iSocket, $sCommand)
If $BytesSent = 0 Then
TCPShutdown()
Return SetError(2, @error, 0)
EndIf
Local $sRecv = "", $sCurrentRecv
While 1
$sCurrentRecv = TCPRecv($iSocket, 16)
If @error <> 0 Then ExitLoop
If $sCurrentRecv <> "" Then $sRecv &= $sCurrentRecv
WEnd
TCPCloseSocket($iSocket)
TCPShutdown()
Return $sRecv
EndFunc