Jump to content

IE / HTTP Help Needed.


SteveO
 Share

Recommended Posts

Is it possible to get this posting function to post using just the GET/POST functions in HTTP.AU3? So I can eliminate IE and it's slow load times :D from the program.

Func NumPost()
    For $I = $startpost To $endpost
        _IENavigate($IE,$Thread[2] & $sid)
        $Post = _IEFormGetObjByName($IE,"post")
        $Mess = _IEFormElementGetObjByName($Post,"message")
        _IEFormElementSetValue($Mess, $startglobalbbcode & $Message & $endmsgbbcode & $startnumbbbcode & $sym & $I & $endglobalbbcode)
        _IEFormImageClick ($Post,"Submit","alt")
        $I = $I+1
        
        Sleep(Random($min, $max, 1))
                        _IENavigate($IE,$Thread[3] & $sid)
        $Post = _IEFormGetObjByName($IE,"post")
        $Mess = _IEFormElementGetObjByName($Post,"message")
        _IEFormElementSetValue($Mess, $startglobalbbcode & $Message & $endmsgbbcode & $startnumbbbcode & $sym & $I & $endglobalbbcode)
        _IEFormImageClick ($Post,"Submit","alt")
        Sleep(Random($min, $max, 1))

    EndFunc
Edited by SteveO
Link to comment
Share on other sites

Get Firefox , install the addon Live HTTP Headers. Type what yo need while live HTTP headers window is open. See how the header is posted. Then use HTTPPost / Get and recreate the header and add the variables in the correct spot

Thank you so much! Now would this work for actually submitting the form as well?

Link to comment
Share on other sites

Yes. I believe it should. Basically use the HTTP Post , recreate the header that live HTTP Headers shows you, then post it , receive the output. If you need help with Live HTTP Headers, or don't understand just post and I'll help you out.

Thanks A TON! I'll probably be posting some more, I don't completely understand it but from seeing what the HTTP Headers Addon for firefox gives me, it looks like it should just be copy/paste.

Link to comment
Share on other sites

Okay, so I just ran through a standard login, post, and logut. Then I basically copied that and put it into AutoIt format. I tried it and ran it, it doesn't seem to work. I figured it wouldn't, but i have no idea why it's not working.

I have hidden specific pieces of information with asterisks (*) If you think this should be working and want to test it with all the information, please let me know and i'll provide you with the blanks.

Also I had to separate a line of code from once of the HTTPPost commands so it wouldn't stretch the page out.

#include <HTTP.au3>



;;Script Start
While 1
$gaia = _HTTPConnect("http://gaiaonline.com", 80 )

_HTTPPost($gaia, "/gaia/login.php username=******************&password=*******&x=25&y=13&submit=Login&redirect=%2F&frob=f9380230c3a5df7402bf4feb8e07a329")

;;Login
_HTTPGet($gaia, "/src/yui/tabview/tabview-min.js?118-30")
_HTTPGet($gaia, "/src/js/landing/main_landing.js?118-30")
_HTTPGet($gaia, "/src/yui/tabview/assets/tabview.css?118-30")
_HTTPGet($gaia, "/src/css/landing/main_landing.css?118-30")
_HTTPGet($gaia, "/advertise/donators/?size=lrec")
_HTTPGet($gaia, "/forum/pulse?id=169&ts=1200636983&timestamp=1200636892")

;;Posting
_HTTPGet($gaia, "/forum/compose/entry/new/********/")
_HTTPGet($gaia, "/advertise/donators/?size=leaderboard")
_HTTPGet($gaia, "/forum/pulse?id=169&ts=1200636863&timestamp=1200636758")
_HTTPPost($gaia, "/forum/compose/entry/new/********/ message=%5Balign%3Dcenter%5D%3Aninja%3A%5B%2Falign%5D&nonce=986252383.1200636860.2135757252&action_submit=submit &basic_type=0&compound_type=0&friends_bg=&friends%5B%5D=&friends%5B%5D=&friends%5B%5D=&friends%5B%5D=&friends%5B%5D=&friends %5B%5D=&random_min=&random_max=&dice_sides=0&dice_amount=")
_HTTPGet($gaia, "/advertise/donators/?size=leaderboard")
_HTTPGet($gaia, "/forum/pulse?id=169&ts=1200636893&timestamp=1200636758")
_HTTPGet($gaia, "/forum/services/t.********/")

;;Logout
_HTTPGet($gaia, "/gaia/login.php?mode=logout&redirect=http%3A%2F%2Fwww.gaiaonline.com%2F%3Flogin_success%3D1&userid=********")
_HTTPGet($gaia, "/iaction/stegai_LandingPage_1")
WEnd
Edited by SteveO
Link to comment
Share on other sites

Okay, so I just ran through a standard login, post, and logut. Then I basically copied that and put it into AutoIt format. I tried it and ran it, it doesn't seem to work. I figured it wouldn't, but i have no idea why it's not working.

I have hidden specific pieces of information with asterisks (*) If you think this should be working and want to test it with all the information, please let me know and i'll provide you with the blanks.

Also I had to separate a line of code from once of the HTTPPost commands so it wouldn't stretch the page out.

#include <HTTP.au3>



;;Script Start
While 1
$gaia = _HTTPConnect("http://gaiaonline.com", 80 )

_HTTPPost($gaia, "/gaia/login.php username=******************&password=*******&x=25&y=13&submit=Login&redirect=%2F&frob=f9380230c3a5df7402bf4feb8e07a329")

;;Login
_HTTPGet($gaia, "/src/yui/tabview/tabview-min.js?118-30")
_HTTPGet($gaia, "/src/js/landing/main_landing.js?118-30")
_HTTPGet($gaia, "/src/yui/tabview/assets/tabview.css?118-30")
_HTTPGet($gaia, "/src/css/landing/main_landing.css?118-30")
_HTTPGet($gaia, "/advertise/donators/?size=lrec")
_HTTPGet($gaia, "/forum/pulse?id=169&ts=1200636983&timestamp=1200636892")

;;Posting
_HTTPGet($gaia, "/forum/compose/entry/new/********/")
_HTTPGet($gaia, "/advertise/donators/?size=leaderboard")
_HTTPGet($gaia, "/forum/pulse?id=169&ts=1200636863&timestamp=1200636758")
_HTTPPost($gaia, "/forum/compose/entry/new/********/ message=%5Balign%3Dcenter%5D%3Aninja%3A%5B%2Falign%5D&nonce=986252383.1200636860.2135757252&action_submit=submit &basic_type=0&compound_type=0&friends_bg=&friends%5B%5D=&friends%5B%5D=&friends%5B%5D=&friends%5B%5D=&friends%5B%5D=&friends %5B%5D=&random_min=&random_max=&dice_sides=0&dice_amount=")
_HTTPGet($gaia, "/advertise/donators/?size=leaderboard")
_HTTPGet($gaia, "/forum/pulse?id=169&ts=1200636893&timestamp=1200636758")
_HTTPGet($gaia, "/forum/services/t.********/")

;;Logout
_HTTPGet($gaia, "/gaia/login.php?mode=logout&redirect=http%3A%2F%2Fwww.gaiaonline.com%2F%3Flogin_success%3D1&userid=********")
_HTTPGet($gaia, "/iaction/stegai_LandingPage_1")
WEnd
I see what your trying to do and I'm going to give you one word of advice. Stick with IE. This is just for simple HTTP posting and HTTP Get. The reason this isn't working is it isn't storying cookies and so on and so forth. Just stick with IE, its for the best. Whats wrong with IE anyways? (I know there is a lot wrong i just mean for automation)
Link to comment
Share on other sites

I see what your trying to do and I'm going to give you one word of advice. Stick with IE. This is just for simple HTTP posting and HTTP Get. The reason this isn't working is it isn't storying cookies and so on and so forth. Just stick with IE, its for the best. Whats wrong with IE anyways? (I know there is a lot wrong i just mean for automation)

Eh, it's just not quick enough. Waiting for the pages to load, is just completely killing the speed. I've done all the correct optimizations and while they have helped to speed it up, its still not fast enough. The posting function I have in my first post, isn't the one I'm using, I'm using another one that allows me to use multiple accounts making the whole process much faster than having just 1 account posting.

What if I used IE to login and used the HTTP GET/POST to actually do the posting? Would there be any way to use both and have it work?

Edited by SteveO
Link to comment
Share on other sites

Eh, it's just not quick enough. Waiting for the pages to load, is just completely killing the speed. I've done all the correct optimizations and while they have helped to speed it up, its still not fast enough.

What if I used IE to login and used the HTTP GET/POST to actually do the posting? Would there be any way to use both and have it work?

No HTTP post/get doesn't use IE, thus doesn't access cookies or anything. Well is it slow because you were using IEloadwait parameter? You can make IE whip around like hell, trust me I have it isn't hard.

Link to comment
Share on other sites

No HTTP post/get doesn't use IE, thus doesn't access cookies or anything. Well is it slow because you were using IEloadwait parameter? You can make IE whip around like hell, trust me I have it isn't hard.

Nope. I only have it waiting on one page. It's just their site has so much crap to load. >.< I'm at this 4 post per minute barrier that I can't seem to get past. So I think that's my limit.

Edited by SteveO
Link to comment
Share on other sites

Nope. I only have it waiting on one page. It's just their site has so much crap to load. >.< I'm at this 4 post per minute barrier that I can't seem to get past. So I think that's my limit.

You do know that you can use the HTTP headers that you got, and create IE links, then just navigate to them, let them load for 1 second. Then navigate to the next page you need to.

Link to comment
Share on other sites

You do know that you can use the HTTP headers that you got, and create IE links, then just navigate to them, let them load for 1 second. Then navigate to the next page you need to.

Oh, woa. That's an awesome idea.

So instead of "/gaia/login.php?mode=logout&redirect=http%3A%2F%2Fwww.gaiaonline.com%2F%3Flogin_success%3D1&userid=********"

I'd just navigate to "http://www.gaiaonline.com/gaia/login.php?mode=logout&redirect=http%3A%2F%2Fwww.gaiaonline.com%2F%3Flogin_success%3D1&userid=********"

Right?

EDIT

Just tested turning those headers into full links....doesn't seem to work.

Well at least not for the POST request (I get a nice NOT FOUND page). Works for the GET request.

Link to comment
Share on other sites

Oh, woa. That's an awesome idea.

So instead of "/gaia/login.php?mode=logout&redirect=http%3A%2F%2Fwww.gaiaonline.com%2F%3Flogin_success%3D1&userid=********"

I'd just navigate to "http://www.gaiaonline.com/gaia/login.php?mode=logout&redirect=http%3A%2F%2Fwww.gaiaonline.com%2F%3Flogin_success%3D1&userid=********"

Right?

EDIT

Just tested turning those headers into full links....doesn't seem to work.

Well at least not for the POST request (I get a nice NOT FOUND page). Works for the GET request.

Send me your code and I will optimize it for you.

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...