Function GetHttpSource (sUrl As String) As Integer
Dim Ret%
Dim sPost$
Dim iLen%
Dim sFileOut$
If sUrl = "" Then
Exit Function
End If
sFileOut = GlobPU.XasName + "-Cur.HTM"
Kill sFileOut
If GlobxRpcModeCall = 6 Then
iLen = Len(sUrl)
sPost = "POST" + " /" + sUrl + " HTTP/1.0" + Chr$(13) + Chr$(10)
sPost = sPost + "Accept: */*" + Chr$(13) + Chr$(10)
sPost = sPost + "Referer: http://" + GlobxRpcCurHost + Chr$(13) + Chr$(10)
sPost = sPost + "Accept-Language: fr" + Chr$(13) + Chr$(10)
sPost = sPost + "Content-Type: text/html" + Chr$(13) + Chr$(10)
sPost = sPost + "Content-Length: " + CStr(iLen) + Chr$(13) + Chr$(10)
sPost = sPost + "Proxy-Connection: Keep-Alive" + Chr$(13) + Chr$(10)
sPost = sPost + "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" + Chr$(13) + Chr$(10)
sPost = sPost + "Host: " + GlobxRpcCurHost + Chr$(13) + Chr$(10)
sPost = sPost + "Cookie: " + CStr(GlobxRpcIdSession) + "-" + GlobxRpcUserName + Chr$(13) + Chr$(10)
sPost = sPost + "Pragma: no-cache" + Chr$(13) + Chr$(10)
sPost = sPost + Chr$(13) + Chr$(10) + sUrl + Chr$(13) + Chr$(10)
Else
sPost = "GET" + " /" + sUrl + " HTTP/1.0" + Chr$(13) + Chr$(10)
sPost = sPost + "Accept: */*" + Chr$(13) + Chr$(10)
sPost = sPost + "Referer: http://" + GlobxRpcCurHost + Chr$(13) + Chr$(10)
sPost = sPost + "Accept-Language: fr" + Chr$(13) + Chr$(10)
sPost = sPost + "Proxy-Connection: Keep-Alive" + Chr$(13) + Chr$(10)
sPost = sPost + "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" + Chr$(13) + Chr$(10)
sPost = sPost + "Host: " + GlobxRpcCurHost + Chr$(13) + Chr$(10)
sPost = sPost + "Pragma: no-cache" + Chr$(13) + Chr$(10)
sPost = sPost + Chr$(13) + Chr$(10)
End If
'"style="+ Chr$(34)+"font-family:VERDANA;font-size=8pt;color:#454564;" + Chr$(34)
Ret = DoXMLToFile(sFileOut, "" + Chr$(13) + Chr$(10))
Ret = DoXMLToFile(sFileOut, sPost)
Ret = DoXMLToFile(sFileOut, " " + Chr$(13) + Chr$(10))
Ret = SetIhmOut(sFileOut, True)
End Function
|