Jump to content

Posting to a forum.


Recommended Posts

Like before I wanted to login and post to Gaiaonline.com. I figured out that it is possible to use WinHttpRequest to accomplish this. But, I don't know how.

Can anyone give me an example of how to send data to a server and recieve back a cookie, include that cookie into the header of the next send, set the data of the next send, and finally send the data?

I know I'm not very good at explaining what I want, but I don't know how to say it any other way T_T.

Ok, why doesn't the below script that I made work?

;Settings
$Username = ""
$Password = ""
$Topic = ""
$Forum = ""

;Navigate to Gaia Online & grab "gaia2_sid" cookie.
$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("GET","http://www.gaiaonline.com",False)
$oHTTP.Send()
$gaia2_sid = $oHTTP.GetResponseHeader("Set-Cookie: gaia2_sid")

;Login to Gaia Online
$oHTTP.Open("POST","http://www.gaiaonline.com/gaia/login.php",False)
$Sid = StringTrimLeft($gaia2_sid,10)
$Sid = StringLeft($Sid,32)
$Login = "username=" & $Username & "&password=" & $Password & "&x=22&y=22&submit=Login&sid=" & $Sid
$oHTTP.Send($Login)
Edited by goflago
Link to comment
Share on other sites

Hmm, not that im helping, but seems gaia is getting bigger =P more people talking about it here, your the 4th ive seen in like 2 weeks

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

:::BACK ON TOPIS::::

This would be a little messy but why not just simulate mousemoves and sends?

:::::I CANT SPELL TOPIS TOPIK WHATEVER::::

Edited by codemyster
Link to comment
Share on other sites

are you just making this to get a little extra gold? cheater :D

A little? Lol, my IE.au3 based bot got me quite a lot of gold for a little effort(Over 50k in 4 days). But, if I can accomplish this winhttp based bot I can bring in much, much more than my IE.au3 based one. I could post in a more reliable fashion, lower my bandwidth intake, and I could post with multiple bots at one time! Think about 10 bots posting once ever 51 seconds for 4 gold each post. Then with each post followed by a poll for 10 gold each. So, 14 gold per post/poll every 51 seconds. Imagine how much you could make in one hour! 10*14*70 = 9800. That's about 9,800 gold per hour! Amazing. But, I need to find out how to make it work. T_T

EDIT: I already completed a bot for form filling in IE.au3. I posted it in my previous topic. Link

Edited by goflago
Link to comment
Share on other sites

;Settings
$Username = ""
$Password = ""
$Topic = ""
$Forum = ""

;Navigate to Gaia Online & grab "gaia2_sid" cookie.
$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("GET","http://www.gaiaonline.com",False)
$oHTTP.Send()
$gaia2_sid = $oHTTP.GetResponseHeader("Set-Cookie: gaia2_sid")

;Login to Gaia Online
$oHTTP.Open("POST","http://www.gaiaonline.com/gaia/login.php",False)
$Sid = StringTrimLeft($gaia2_sid,10)
$Sid = StringLeft($Sid,32)
$Login = "username=" & $Username & "&password=" & $Password & "&x=22&y=22&submit=Login&sid=" & $Sid
$oHTTP.Send($Login)

This is what I have so far. Can somebody tell me what I'm doing wrong?

Edited by goflago
Link to comment
Share on other sites

No matter how many times I attempt this I can only get back a 404 Not Found response from the "POST" section. Why? :D

So this is really really not my thing, but I created an account and tried your code. I get a sid and I get no errors with your code.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...