; httpQuery-0-3-5.ahk ; httpQuery GET and POST requests by DerRaphael ; http://www.autohotkey.com/forum/topic33506.html httpQuery(byref Result, lpszUrl, POSTDATA="", HEADERS="") { ; v0.3.5 (w) Sep, 8 2008 by Heresy & derRaphael / zLib-Style release ; updates Aug, 28 2008 ; currently the verbs showHeader, storeHeader, and updateSize are supported in httpQueryOps ; in case u need a different UserAgent, Proxy, ProxyByPass, Referrer, and AcceptType just ; specify them as global variables - mind the varname for referrer is httpQueryReferer [sic]. ; Also if any special dwFlags are needed such as INTERNET_FLAG_NO_AUTO_REDIRECT or cache ; handling this might be set using the httpQueryDwFlags variable as global global httpQueryOps, httpAgent, httpProxy, httpProxyByPass, httpQueryReferer, httpQueryAcceptType , httpQueryDwFlags ; Get any missing default Values defaultOps = (LTrim Join| httpAgent=AutoHotkeyScript|httpProxy=0|httpProxyByPass=0|INTERNET_FLAG_SECURE=0x00800000 SECURITY_FLAG_IGNORE_UNKNOWN_CA=0x00000100|SECURITY_FLAG_IGNORE_CERT_CN_INVALID=0x00001000 SECURITY_FLAG_IGNORE_CERT_DATE_INVALID=0x00002000|SECURITY_FLAG_IGNORE_CERT_WRONG_USAGE=0x00000200 INTERNET_OPEN_TYPE_PROXY=3|INTERNET_OPEN_TYPE_DIRECT=1|INTERNET_SERVICE_HTTP=3 ) Loop,Parse,defaultOps,| { RegExMatch(A_LoopField,"(?P