I tried to use the "iOptionGet" -> "url" but it returns an
"ERROR". This feature did not seem to work on regular pages for me. I
notice it returned an error when i tried it on the www.amazon.com
example for Inet as well. How can I capture that key ??
AddExtender("WWINT34i.DLL")
origdir=DirGet()
;Key values
host = "fsecure.royalbank.com" ; from source
;FORM action
mainurl="/RBC/IFTLogin.asp"
outfile=strcat(origdir, "main1.html")
formdata="" ;initialize
;required data passed fields
formdata=iContentUrl(formdata, "UserId", "********")
formdata=iContentUrl(formdata, "Password", "********")
formdata=iContentUrl(formdata, "LoginButton", "Login")
; Basic Web page fetch Script
tophandle=iBegin(2, ""," ")
connecthandle=iHostConnect(tophandle, host, @HTTPS, "", "")
datahandle=ihttpInit(connecthandle, "POST", mainurl, "", 0) ;watch referer for security reasons
rslt = iHttpOpen(datahandle, "", formdata, -1);
If rslt == "ERROR" || rslt != 200
Message( StrCat("Error: ", iGetlastError() ), iGetResponse() )
headers=iHttpHeaders(datahandle)
AskItemList("Rslt=%rslt%",headers, @tab, @unsorted, @single)
Endif
Message("tophandle", tophandle)
Message("rslt", rslt)
Message("Headers", iHttpHeaders(datahandle))
Message("Connect Handle", connecthandle)
Message("datahandle", datahandle)
urlcapture = iOptionGet(tophandle, "url") ;<== ERRORS out
Message("URL", "%urlcapture%")
xx=iReadData(datahandle, outfile)
;now have the returned web
; use the web browser to execute it
ShellExecute(outfile, "", "", @NORMAL, "OPEN")
;Run(strcat(origdir, "amazonpost3.wbt"),"")