12-29-2014, 04:26 PM
I am trying to open a web page with POST instead of GET in order to post some variables to it, but I can't get the code to work. The page opens, but it does not receive the POST variables.
VARIANT flags=0
VARIANT target="_blank"
VARIANT* postdata
VARIANT headers = "Content-Type: application/x-www-form-urlencoded"
SAFEARRAY* psa
str data="a=hello"
psa = SafeArrayCreateVector(VT_UI1,0,len(data))
SafeArrayAccessData(psa, &data)
SafeArrayUnaccessData(psa) ;; not sure if this is needed
postdata = psa
SHDocVw.IWebBrowser2 b=web("")
b.Navigate("http://siuhradweb/test.php" &flags &target postdata &headers)
VARIANT flags=0
VARIANT target="_blank"
VARIANT* postdata
VARIANT headers = "Content-Type: application/x-www-form-urlencoded"
SAFEARRAY* psa
str data="a=hello"
psa = SafeArrayCreateVector(VT_UI1,0,len(data))
SafeArrayAccessData(psa, &data)
SafeArrayUnaccessData(psa) ;; not sure if this is needed
postdata = psa
SHDocVw.IWebBrowser2 b=web("")
b.Navigate("http://siuhradweb/test.php" &flags &target postdata &headers)