>>*============================================================================== >>PROCEDURE Create_Internet_Object >>LPARAMETER lcObjectName, lcCreateName >>LOCAL lcProxyName, lcProxyPort, lnProxyType, lcProxyUser, lcProxyPW >>IF !"WWIPSTUFF"$UPPER(SET("CLASSLIB")) >> SET CLASSLIB TO .\ww\wwIPStuff ADDITIVE >>ENDIF >> >>IF ! "wwUtils"$SET("PROCEDURE") >> SET PROCEDURE TO .\ww\wwUtils ADDITIVE >>ENDIF >> >>IF ! "WWTTP"$UPPER(SET("PROCEDURE")) >> SET PROCEDURE TO .\ww\WWHTTP ADDITIVE >>ENDIF >> >>IF !EMPTY(lcObjectName) AND EMPTY(lcCreateName) >> MESSAGEBOX("Error passing parameters to Create_Internet_Object in Procfile call support.", 16) >> RETURN .F. >>ENDIF >> >>IF EMPTY(lcObjectName) >> lcObjectName = "oInternet" >> lcCreateName = "wwIPStuff" >>ENDIF >> >>RELEASE &lcObjectName. >>PUBLIC &lcObjectName. >> >>&lcObjectName. = CREATE(lcCreateName) >>IF VARTYPE(&lcObjectName.) <> "O" OR ISNULL(&lcObjectName.) >> RETURN .F. >>ENDIF >> >>USE INFO ALIAS ProxyInfo IN 0 AGAIN >> >>lnConnectionTimeout = INT(VAL(ALLT(LOOKUP(ProxyInfo.Value, "connection_timeout", ProxyInfo.Field)))) >>IF !EMPTY(lnConnectionTimeout) >> &lcObjectName..nConnectTimeout = lnConnectionTimeout >>ENDIF >> >>lnProxyType = INT(VAL(LOOKUP(ProxyInfo.Value, "proxy_type", ProxyInfo.Field))) >>*!* RLT Added to auto detect the proxy settings >>&lcObjectName..nhttpconnecttype = lnProxyType >> >>IF lnProxyType = 3 && Manual Setting >> *!* Get the Proxy name and Port >> lcProxyName = ALLT(LOOKUP(ProxyInfo.Value, "proxy_name", ProxyInfo.Field)) >> >> *!* Get the port number to use. >> lcProxyPort = ALLT(LOOKUP(ProxyInfo.Value, "proxy_port", ProxyInfo.Field)) >> IF !EMPTY(lcProxyPort) >> lcProxyName = lcProxyName + ":"+ lcProxyPort >> ENDIF >> &lcObjectName..cHttpProxyName = ALLT(lcProxyName) >> >> *!* Check for username and password. >> lcProxyUser = ALLT(LOOKUP(ProxyInfo.Value, "proxy_username", ProxyInfo.Field)) >> IF !EMPTY(lcProxyUser) >> &lcObjectName..cHttpProxyUserName = lcProxyUser >> ENDIF >> >> lcProxyPW = ALLT(LOOKUP(ProxyInfo.Value, "proxy_password", ProxyInfo.Field)) >> IF !EMPTY(lcProxyPW) >> &lcObjectName..cHttpProxyPassword = lcProxyPW >> ENDIF >> >>ENDIF >> >>USE IN SELECT("ProxyInfo") >> >>RETURN .T. >>>>
>>>>*** Set mode to multi-part form >>>>oHttp.nHttpPostMode = 2 >>>> >>>>*** Post a file and a regular form variable >>>>*!* Who is sending the message >>>>oHttp.AddPostKey("snetid", lcSnetID) >>>>oHttp.AddPostKey("attach", "1") >>>>oHttp.AddPostKey("fileupload", lcUploadFile, .T.) >>>> >>>>lcHTML = oHttp.HTTPGet(SS_HSS_DIVISIONS_SITE + "?nocache=" + TTOC(DATETIME())) >>>> >>>>>>>>