Gui Posted August 10, 2011 Share Posted August 10, 2011 (edited) Essentially, since the session doesn't expire, would it be possible to open the exact result page from a POST into maybe IE or something, so that instead of reading the source, you see the exact page? I don't mean like: FileDelete('Result.html') FileWrite('Result.html', $data) ShellExecute('Result.html') because with that, it's just the source in an HTML file. Hope it's possible! Thanks! The code would look like so: $hw_open = _WinHttpOpen("Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 GTB7.1") $hw_connect = _WinHttpConnect($hw_open, "host.com") $oPost = "submit=1" $oEx = "/index.php" $h_openRequest = _WinHttpOpenRequest($hw_connect, "POST", $oEx, "HTTP/1.1") _WinHttpSendRequest($h_openRequest, 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' & @CRLF & 'Content-Type: application/x-www-form-urlencoded' & @CRLF, $oPost) _WinHttpReceiveResponse($h_openRequest) $data = '' Do $data &= _WinHttpReadData($h_openRequest) ; $data is complete source code return.. Until @error ;NOW open return URL to the source above ^ somehow into IE or something. GUI Edited August 10, 2011 by Gui Link to comment Share on other sites More sharing options...
Bert Posted August 10, 2011 Share Posted August 10, 2011 ie.au3. its in the helpfile The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Gui Posted August 10, 2011 Author Share Posted August 10, 2011 ie.au3. its in the helpfile I'm guessing you didn't understand my question. :facepalm: I said a "POST", referring to web requests..? "[WinHTTP]" Sigh. Link to comment Share on other sites More sharing options...
Bert Posted August 10, 2011 Share Posted August 10, 2011 I did understand you. You didn't read the helpfile. facepalm yourself. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
monoscout999 Posted August 10, 2011 Share Posted August 10, 2011 I did understand you. You didn't read the helpfile. facepalm yourself.he is reffered to winhttp object. maybe i am wrong but IE.au3 it has nothing to do with "winhttp" object Link to comment Share on other sites More sharing options...
wakillon Posted August 10, 2011 Share Posted August 10, 2011 I'm guessing you didn't understand my question. :facepalm: I said a "POST", referring to web requests..? "[WinHTTP]" Sigh. Try Get instead Post $_Url = "http://www.AutoItScript.com" $httpObj = ObjCreate ( "winhttp.winhttprequest.5.1" ) $httpObj.open ( "GET", $_Url ) $httpObj.send ( ) $_HtmlSource = $httpObj.Responsetext ConsoleWrite ( "-->-- Source Code : " & StringAddCR ( $_HtmlSource ) & @Crlf ) AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Gui Posted August 10, 2011 Author Share Posted August 10, 2011 Try Get instead Post $_Url = "http://www.AutoItScript.com" $httpObj = ObjCreate ( "winhttp.winhttprequest.5.1" ) $httpObj.open ( "GET", $_Url ) $httpObj.send ( ) $_HtmlSource = $httpObj.Responsetext ConsoleWrite ( "-->-- Source Code : " & StringAddCR ( $_HtmlSource ) & @Crlf ) I'm using WinHTTP functions, first off. And second, I don't just need to return source, I want to open the return URL into a browser for interaction. I guess no one understands ;S? I'll add some code to the OP. Link to comment Share on other sites More sharing options...
wakillon Posted August 10, 2011 Share Posted August 10, 2011 I'm using WinHTTP functions, first off. And second, I don't just need to return source, I want to open the return URL into a browser for interaction. I guess no one understands ;S? I'll add some code to the OP. I don't find any WinHTTP function who can open a web browser. i suggest IE : $oIE = ObjCreate ( "InternetExplorer.Application" ) $oIE.Navigate ( $_Url ) AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Gui Posted August 10, 2011 Author Share Posted August 10, 2011 Meh. I always use Web Requests dude to their speed and reliability. Thanks for the suggestion. I'll try to figure something out. >;p Link to comment Share on other sites More sharing options...
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