send data to a server without using a browser?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
tyyi
Posts: 84
Joined: 23 Dec 2015, 08:51

send data to a server without using a browser?

12 May 2016, 21:00

Dear All,

I want to send text data to a web site.
I know the way it via a web browser as below;

URL := https://www.xxxxx.com/senddata.php?data=%var%
wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := False
wb.Navigate(URL)
wb.Quit()

Actually, it works well.

There is just one issue when using this script.

After working this script, IE 11 shows the pop up window, which is " View and track your downloads "
This window used to interrupt other next steps for the script.
( I heard there is no way to block this " View and track your downloads " pop-up.

So, I hope to know the way;

Is it possible to send data to a server(web site) without using IE11, due to pop up window?
Hopefully, I don't want to see ' iexplore.exe ' in "Task Manager", while the script is working.

Thank you all again.
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: send data to a server without using a browser?

13 May 2016, 08:23

Try this.

Code: Select all

URL := "https://www.xxxxx.com/senddata.php?data=" var
WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
WebRequest.Open("GET", URL)
WebRequest.Send()
Please excuse my spelling I am dyslexic.
tyyi
Posts: 84
Joined: 23 Dec 2015, 08:51

Re: send data to a server without using a browser?

16 May 2016, 02:45

Capn Odin wrote:Try this.

Code: Select all

URL := "https://www.xxxxx.com/senddata.php?data=" var
WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
WebRequest.Open("GET", URL)
WebRequest.Send()

I didn't try your suggestion yet, but before doing, I have a question.
Is your script for sending data?

Actually, I did use this script to GET a source of web-page, not SEND.

I will try, then let me share the result of it.

Thank you a lot!
User avatar
rootmos
Posts: 35
Joined: 11 Mar 2016, 04:38
Location: Sweden
Contact:

Re: send data to a server without using a browser?

16 May 2016, 09:09

Im using this to send some api calls, might be usefull!

Code: Select all

HostInput     = google.se ; or ip 8.8.8.8
ErrorMsg      := "error check your api query"
Address	  := "http://api.hackertarget.com/nping/?q=" . HostInput
HTMLdata   := HTTP(Address, "")
	
IfInString, HTMLdata, %ErrorMsg%
{
	Msgbox %ErrorMsg%
} else {
	Msgbox %HTMLdata%
}
Return

HTTP(Address,POSTdata)
{
	ComObjError(false)
	HTTPObject:=ComObjCreate("WinHttp.WinHttpRequest.5.1")
	HTTPObject.SetRequestHeader("User-Agent", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)")
	HTTPObject.Open("GET", Address, false)
	HTTPObject.Send()
	Return HTTPObject.ResponseText
}
Return
Look at me, I am your god now.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: oktavimark, Rohwedder and 235 guests