How to use iHttpInit, do a POST, and grab an HTML Page
Keywords: iHttpInit HTTP POST
The basic technique here is to display the HTML page form you are trying to emulate, check the source HTML code and work in the html FORM parameters.The URL is based on the ACTION line, and the srchstr variable below comes from the various form variables under that.
AddExtender("wwint34I.dll") tophandle=iBegin(0,"","") connecthandle=iHostConnect(tophandle, "techsupt.windowware.com", @HTTP, "", "") ;host to connect to ;Below is the url address that follows the host address (above) as displayed in your browser window url1="/webcgi/webbatch.exe?techsupt/techsrch.web+WinBatch/Bitmaps~and~Clipboard+TechSupport/WinBatch/Bitmaps~and~Clipboard" ;url1="/webcgi/webbatch.exe?dumpinputdata" datahandle=iHttpInit(connecthandle,"POST",url1,"", 7) srchstr='keywords=binarypeek&scope=CHECKED&anyall=CHECKED' rslt = iHttpOpen(datahandle, "", srchstr, -1); zz=iGetLastError() headers=iHttpHeaders(datahandle) AskItemList("LastErr=%zz% Rslt=%rslt%",headers,@tab,@sorted,@single) xx=iReadData(datahandle,"techsrch.html") iClose(datahandle) iClose(connecthandle) iClose(tophandle) Run("notepad.exe","techsrch.html") exit
Article ID: W12596Filename: How to Use iHttpOpen - Do a Post - and Grab HTML.txt