AzKay Posted November 14, 2008 Posted November 14, 2008 (edited) Just a helpful copypasta script that I made.Might help others.$oHTTP = ObjCreate("winhttp.winhttprequest.5.1") ConsoleWrite(_HTTPRequest($oHTTP, "GET", "http://google.com") & @CRLF) Func _HTTPRequest($oHTTP, $oMethod, $oURL, $oData = "") $oHTTP.Open($oMethod, $oURL, False) If $oMethod = "POST" Then $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($oData) Return $oHTTP.ResponseText EndFuncEDIT::Typo'd. Thanks Manadar Edited November 14, 2008 by AzKay # MY LOVE FOR YOU... IS LIKE A TRUCK- #
jvanegmond Posted November 14, 2008 Posted November 14, 2008 ^ bugfixed. $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") ConsoleWrite(_HTTPRequest($oHTTP, "GET", "http://google.com") & @CRLF) Func _HTTPRequest($oHTTP, $oMethod, $oURL, $oData = "") $oHTTP.Open($oMethod, $oURL, False) If $oMethod = "POST" Then $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($oData) Return $oHTTP.ResponseText EndFunc github.com/jvanegmond
AzKay Posted November 14, 2008 Author Posted November 14, 2008 Oh right. Thanks for that xD # MY LOVE FOR YOU... IS LIKE A TRUCK- #
jvanegmond Posted November 14, 2008 Posted November 14, 2008 Oh right. Thanks for that xDNo problem, it was minor. =P github.com/jvanegmond
subfighter Posted November 14, 2008 Posted November 14, 2008 this look simliar to InGetSource... does do the same function and any advantages..
jvanegmond Posted November 14, 2008 Posted November 14, 2008 this look simliar to InGetSource... does do the same function and any advantages..Wrong.This allows you to set the header, and many other things if you know what you're doing. It's InetGetSource advanced. 8) github.com/jvanegmond
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now