Function NMEAInitSession (sCompo As String, iMode As Integer, spw As String) As Integer
Dim Ret%
Dim sPost$
Dim sconfig$
Dim sReq$
GlobNMEAModeCall = 1
sPost = "GET /"
GlobNMEALastURL = "XasOpenSession(" + GlobNMEAUserName + ","
GlobNMEALastURL = GlobNMEALastURL + spw + ","
GlobNMEALastURL = GlobNMEALastURL + sCompo + ","
GlobNMEALastURL = GlobNMEALastURL + CStr(iMode) + ","
GlobNMEALastURL = GlobNMEALastURL + GlobNMEAFileSession + ",);"
GlobNMEALastURL = GlobNMEALastURL + "?XCMD." + CStr(XasGetRanDom(1000, 9900))
GlobNMEALastURI = XasSECEncrypt(1, GlobNMEAUserName, spw, GlobNMEALastURL)
sPost = sPost + GlobNMEALastURI + " HTTP/1.0" + Chr$(13) + Chr$(10)
sPost = sPost + "Accept: */*" + Chr$(13) + Chr$(10)
sPost = sPost + "Referer: http://" + GlobNMEACurHost + 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 + "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: " + GlobNMEACurHost + Chr$(13) + Chr$(10)
sPost = sPost + "Pragma: no-cache" + Chr$(13) + Chr$(10)
sPost = sPost + Chr$(13) + Chr$(10) + Chr$(13) + Chr$(10)
sconfig = "RESEAU=" + CStr(XASRESEAU_HTTPWEB) + ";"
sconfig = sconfig + "MEDIA=" + CStr(XASMEDIA_WEB) + ";"
sconfig = sconfig + "HOST=" + GlobNMEACurHost + ";"
sconfig = sconfig + "PORT=" + CStr(GlobNMEACurPort) + ";"
sconfig = sconfig + "MAXCONNEXION=20;"
sconfig = sconfig + "TAILLEPAQUET=255;"
sconfig = sconfig + "NUMCARTE=1;"
sconfig = sconfig + "NUMLIGNE=1;"
sconfig = sconfig + "TIMEOUT=20;"
sconfig = sconfig + "USERID=" + CStr(-1) + ";"
sconfig = sconfig + "COMPONENT=" + GlobCurService + ";"
sconfig = sconfig + "POST=;" + sPost
Ret = XasUserCall(sconfig)
End Function
|