fielmann Posted April 5, 2008 Share Posted April 5, 2008 Hello Autoit-friends! Login to website with HTTP.UDF I can't get the website content with _HTTPRead() after sending POST: #include <HTTP.au3> $host = "www.inselmacht.de" $page = "/index.php" $socket = _HTTPConnect($host) $get = _HTTPGet($host, $page, $socket) $recv = _HTTPRead($socket,1) msgbox(0,"",$recv[4]) $result = StringInStr($recv[4], "PHPSESSID=") msgbox(0,"position",$result) $sid = StringMid($recv[4], $result+10, 32) MsgBox(0, "", $sid) $page = "/login.php?sid=" & $sid & " login_nick=user123&login_pw=123456&login_game=1&Submit=Zum+Spiel+..." $num = _HTTPPost($host, $page) MsgBox(0,"POST " & @error,$num) $recv = _HTTPRead() msgbox(0,@error,$recv) Please check the script and tell me where the problem is. Link to comment Share on other sites More sharing options...
fielmann Posted April 6, 2008 Author Share Posted April 6, 2008 34 views and no reply ? Has anybody an idea why I can't get the website after POST? Link to comment Share on other sites More sharing options...
fielmann Posted April 11, 2008 Author Share Posted April 11, 2008 Has nobody an idea 4 my problem ? Link to comment Share on other sites More sharing options...
weaponx Posted April 11, 2008 Share Posted April 11, 2008 What did you use to capture the POST from the browser? Link to comment Share on other sites More sharing options...
fielmann Posted April 11, 2008 Author Share Posted April 11, 2008 (edited) What did you use to capture the POST from the browser?why should I capture the POST that I want to send to the server?I thought that I POST to the server and get back the result with _HTTPreadthe first part with _HTTPGet work without problemsIs there a difference in sending a POST-command? Edited April 11, 2008 by fielmann Link to comment Share on other sites More sharing options...
Squirrely1 Posted April 11, 2008 Share Posted April 11, 2008 (edited) 34 views and no reply ? wacko...Your method of logging-in to a gaming site - conspicuously using non-standard UDF's and determining a Session ID, might lead people to believe you are attempting to hack a website.First, sign a confession that this is not what you are trying to do, then write an extensive treatise on morality generally, and lastly explain why you are trying to hack this website? Edited April 11, 2008 by Squirrely1 Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
fielmann Posted April 11, 2008 Author Share Posted April 11, 2008 Your method of logging-in to a gaming site - conspicuously using non-standard UDF's and determining a Session ID, might lead people to believe you are attempting to hack a website.First, sign a confession that this is not what you are trying to do, then write an extensive treatise on morality generally, and lastly explain why you are trying to hack this website?I don't want to hack the site!I want to build a robot that can build game-items automatictily.Before I could do this, I have to enter with my account! Link to comment Share on other sites More sharing options...
Squirrely1 Posted April 11, 2008 Share Posted April 11, 2008 There are many topics on the forums that cover logging-in to gaming sites and other sites. At the top of this webpage, toward the right, there is a "Search" link. Click on it and study some results, why not? Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
fielmann Posted April 11, 2008 Author Share Posted April 11, 2008 There are many topics on the forums that cover logging-in to gaming sites and other sites. At the top of this webpage, toward the right, there is a "Search" link. Click on it and study some results, why not?Why do you think I have started this case here?I've already studied the forum before I started it.Back to the roots: Do you have any technical information for the POST-problem ? Link to comment Share on other sites More sharing options...
Squirrely1 Posted April 11, 2008 Share Posted April 11, 2008 This stuff is well beyond squirrely capability - but if you are wondering about where is the thread where the author of the include file "HTTP.au3", it is at this link. Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
fielmann Posted April 11, 2008 Author Share Posted April 11, 2008 This stuff is well beyond squirrely capability - but if you are wondering about where is the thread where the author of the include file "HTTP.au3", it is at this link.I know the link! Or where do you expect to find informations about HTTP.AU3 - UDF ??? I don't need a link, I need an answer for my POST-question why it does not work in palpable case! Link to comment Share on other sites More sharing options...
fielmann Posted April 13, 2008 Author Share Posted April 13, 2008 I know the link! Or where do you expect to find informations about HTTP.AU3 - UDF ??? I don't need a link, I need an answer for my POST-question why it does not work in palpable case!any ideas ??? Link to comment Share on other sites More sharing options...
fielmann Posted April 14, 2008 Author Share Posted April 14, 2008 any ideas ???no ideas ???? Link to comment Share on other sites More sharing options...
aGorilla Posted April 14, 2008 Share Posted April 14, 2008 (edited) Well, I'm not using the same approach, but this is how I'm doing some screen scraping. It may be overkill (I'm too new to tell), but it works: #include <IE.au3>; browser #include <GUIConstants.au3>; GUI Func WebGetPage($url) Local $text, $browser, $window, $GUIActiveX _IEErrorHandlerRegister() $browser = _IECreateEmbedded() GUISetState(@SW_HIDE);HIDE GUI $window = GUICreate($Config.item('Title_WebGetPage')) $GUIActiveX = GUICtrlCreateObj($browser, 1, 1) _IENavigate($browser, $url) $text = _IEBodyReadHTML($browser) $text = StringStripWS($text, 3) GUIDelete($window) return $text EndFunc edit: added 'includes' Edited April 14, 2008 by aGorilla Search AutoItScript.com via Google 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