WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WinInet
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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:   W12596
Filename:   How to Use iHttpOpen - Do a Post - and Grab HTML.txt
File Created: 2017:07:28:13:58:46
Last Updated: 2001:03:01:15:22:44