AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[function] httpQuery GET and POST requests - update 0.3.6
Goto page Previous  1, 2, 3 ... 11, 12, 13, 14, 15, 16  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  

Should a more generic function be released which will include the already available web functions, such as header queries, uri encoding, base encoding, etc ?
yes, i'd like to have one function to get all neccessary http functionalities in one instead of collecting each for my own
95%
 95%  [ 95 ]
no, i prefer collecting the functions i need
4%
 4%  [ 4 ]
neither nor ... explained in post
1%
 1%  [ 1 ]
Total Votes : 100

Author Message
NLI
Guest





PostPosted: Mon Aug 23, 2010 6:14 pm    Post subject: Reply with quote

I just stumbled across this from google:
http://code.google.com/apis/chart/docs/post_requests.html

This could be a great alternative for making graphs and charts easily. However, I can't wrap my head around how to get it working. Could some make an example with httpQuery(), please? It'd be greatly appriciated!
Back to top
popsot



Joined: 11 Jul 2009
Posts: 6

PostPosted: Mon Aug 23, 2010 7:52 pm    Post subject: https Reply with quote

why i am getting blank message Sad
Code:

#include httpQuery.ahk
html    := ""
URL      := "https://www.paypal.com"
httpQueryOps := "storeHeader"
length := httpQuery(html,URL,headers)
varSetCapacity(html,-1)
msgbox %html%
Back to top
View user's profile Send private message
CobaltKitsune



Joined: 10 Sep 2010
Posts: 35

PostPosted: Tue Sep 28, 2010 8:07 pm    Post subject: Changing Port? Reply with quote

Is there a way to change the used ports with this? I'm pretty sure what it currently uses is getting blocked/dropped by my computer/network firewall, and would really appreciate it being able to use accepted ports.
Back to top
View user's profile Send private message
cyx
Guest





PostPosted: Thu Oct 14, 2010 8:40 pm    Post subject: How to close or disconnect / reconnect Reply with quote

Hi,

im using httpQuery to send some postdata to a php script. its is always working directly after the start of my ahk program but not if im using it in a loop. the php script is creating a cookie but i dont wanna use the generated data. instead, i would like to disconnect and send a fresh query every loop (like i would restart my ahk script). how can i do this, whats the difference between using httpQuery for the first time and in a loop with a generated response header?

Thank you so much.

cyx
Back to top
Guest






PostPosted: Fri Oct 15, 2010 8:24 pm    Post subject: Re: Changing Port? Reply with quote

CobaltKitsune wrote:
Is there a way to change the used ports with this? I'm pretty sure what it currently uses is getting blocked/dropped by my computer/network firewall, and would really appreciate it being able to use accepted ports.
whats your setup?
Back to top
Guest






PostPosted: Sat Oct 16, 2010 2:28 am    Post subject: Re: https Reply with quote

popsot wrote:
why i am getting blank message Sad


Try adding this:
Code:
httpQueryDwFlags := (0x00800000|0x00001000|0x00002000|0x00000100)
Back to top
anon
Guest





PostPosted: Thu Oct 21, 2010 8:08 pm    Post subject: Empty result - please can someone give some simple code? Reply with quote

Hi,

Code:
http := ""
len := httpQuery(html, "http://www.google.co.uk")
varSetCapacity(html,-1)
MsgBox %html%


Result is empty box. Please can someone just show me how to do a HTTP GET? Nothing works for me. I am on Windows 7 64 bit.

Many thanks.
Back to top
derRaphael



Joined: 23 Nov 2007
Posts: 841
Location: ~/.

PostPosted: Thu Oct 21, 2010 10:11 pm    Post subject: Reply with quote

u did everything right, but which version of ahk are you using?
_________________

    All scripts, unless otherwise noted, are hereby released under CC-BY
Back to top
View user's profile Send private message
derRaphael



Joined: 23 Nov 2007
Posts: 841
Location: ~/.

PostPosted: Tue Oct 26, 2010 7:41 pm    Post subject: Reply with quote

updated httpQuery to version 0.3.6 being more user friendly and eliminating the need for varsetcapacity when just using it for textual content (like html)
greets
dR
_________________

    All scripts, unless otherwise noted, are hereby released under CC-BY
Back to top
View user's profile Send private message
flashkid



Joined: 25 Aug 2007
Posts: 110

PostPosted: Sat Oct 30, 2010 11:33 am    Post subject: Reply with quote

Can you please change INTERNET_OPEN_TYPE_DIRECT in the defaultOps to 0 to use the option from the registry? If you don't want to do that, maybe you could add it to the httpQueryOps?

I could change this option manually in your script, but I want to use a script in it's original style Smile
I would much appreciate that.

Greets, flashkid
Back to top
View user's profile Send private message
IsNull



Joined: 10 May 2007
Posts: 593
Location: .switzerland

PostPosted: Sat Oct 30, 2010 3:05 pm    Post subject: Reply with quote

Ola, dR Wink

Könntest du dein httpQuery Unicode kompatibel machen?

Ich dreh noch ab mit dem dämlichen AHK_L <--> AHK Basic wechseln die ganze Zeit.


Wenn nicht mach ich es analog zu dem hier - http://www.autohotkey.com/forum/topic54375.html einfach mit der aktuellen Syntax. Aber es wäre wohl einfacher wenn du als Ersteller es offiziell als unicode tauglich veröffentlichen würdest.

c ya
_________________
http://securityvision.ch
AHK 2D GAME ENGINE
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Sat Dec 25, 2010 5:22 am    Post subject: Reply with quote

whats the problem with this code. I am not able to figure out why it doesnt auto login into youtube


Code:
; exmpl.searchAHKforum.httpQuery.ahk
; Searches the forum for a given Phrase: in this case httpQuery
#noenv
html     := ""
URL := "https://www.google.com/accounts/ServiceLoginAuth"
POSTData := "ltmpl=sso&continue=http%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue&service=youtube&uilel=3&dsh=-1935203104280297217&ltmpl=sso&hl=en_US&next=%2F&ltmpl=sso&timeStmp=&secTok=&GALX=cAVFM2udKKk&Email=jessicalovesgum&Passwd=pass&rmShown=1&signIn=Sign+in&asts="

length := httpQuery(html,URL,POSTdata)
msgbox % length
varSetCapacity(html,-1)
fileappend,%html%,files.html
run files.html

Gui,Add,Edit,w600 +Wrap r25,% html
Gui,Show
Return

GuiClose:
GuiEscape:
   ExitApp
   
#include C:\Program Files\AutoHotkey\Lib\httpQuery.ahk
Back to top
Guest






PostPosted: Sat Dec 25, 2010 6:41 am    Post subject: Reply with quote

Can someone please make examples for whats described as self explainatory by Mr raphael
Back to top
Guest






PostPosted: Wed Dec 29, 2010 4:19 am    Post subject: Reply with quote

Is this a bug in httpquery?



Code:

URL  := "https://www.google.com/accounts/ClientLogin?Email=username&Passwd=pass&service=youtube&source=test"
msgbox % httpQuery(buffer,URL)
VarSetCapacity(buffer,-1)
msgbox % buffer
Back to top
Guest






PostPosted: Thu Dec 30, 2010 10:10 pm    Post subject: Reply with quote

httpQuery seems to be broken. The above post results in -1 and "".
Running Windows 7 64bit with the most recent AHK and httpQuery.
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3 ... 11, 12, 13, 14, 15, 16  Next
Page 12 of 16

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group