Can anyone offer some suggestions ? I have tried with and without the Base64Encoder.
Code: Select all
; based on FreeBASIC example
; changed to PB by ts-soft
; changed by Singo to try and post data to php page
EnableExplicit
Define.l ieApp, flags=0
Define.s post_data,base_data,url,targetframe="",headers
dhToggleExceptions(#True)
ieApp = dhCreateObject("InternetExplorer.Application")
If ieApp
dhPutValue (ieApp, "Visible = %b", #True)
url = "10.0.0.155/q/qtest.php"
post_data = "email=myemail@mail.com.au&name=myname"
base_data = Space(512)
Base64Encoder(@post_data,Len(post_data),@base_data,512)
base_data=Trim(base_data)
headers = "Content-Type: application/x-www-form-urlencoded" +Chr(13)+Chr(10)
dhCallMethod(ieApp, "Navigate(%T,%d,%s,%s,%s)", @url,flags,@targetframe,@base_data,@headers)
dhReleaseObject(ieApp) : ieApp = 0
EndIf
Singo