foster74 Posted January 8, 2009 Posted January 8, 2009 I have been using the following to pull page source from pages which do not require a log in. $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oRet = _HTTPRequest($oHTTP, "GET", "http://www.awebsite.com") 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 Would I be able to also use ObjCreate("winhttp.winhttprequest.5.1") to get page source from behind a log in? I have looked at some other options such as INet.au3, and WinHTTP.au3, but am not sure if they will work. What method would be best for me to look into, any suggestions would be greatly appreciated. I am looking to run many instances of the same script on the same computer, and with IE being a resource hog in comparison, it really isn't an option for me. Thanks for any help. =)
BrettF Posted February 15, 2009 Posted February 15, 2009 Send a post request to log in maybe? Nothing is stopping you from having a go! Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
toxicvn Posted February 15, 2009 Posted February 15, 2009 Send a post request to log in maybe?Nothing is stopping you from having a go! i have bin try login with :$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")$oRet = _HTTPRequest($oHTTP, "GET", "http://www.awebsite.com")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.ResponseTextEndFuncbut it don't working
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