Jump to content
Sign in to follow this  
SteveO

IE / HTTP Help Needed.

Recommended Posts

SteveO

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

Share this post


Link to post
Share on other sites
weaponx

I can't find this damn HTTP UDF.

Share this post


Link to post
Share on other sites
Valuater

86 views and not 1 response....

Is this possible?

Thats why, rephrase your post, ask for IE Help and you will get the help you want!!!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
SteveO

Is this possible?

Thats why, rephrase your post, ask for IE Help and you will get the help you want!!!

8)

Done. Lets see if that helps.


Share this post


Link to post
Share on other sites
Thatsgreat2345

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

Share this post


Link to post
Share on other sites
SteveO

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?


Share this post


Link to post
Share on other sites
Thatsgreat2345

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.

Share this post


Link to post
Share on other sites
SteveO

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.


Share this post


Link to post
Share on other sites
SteveO

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

Share this post


Link to post
Share on other sites
Thatsgreat2345

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)

Share this post


Link to post
Share on other sites
SteveO

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

Share this post


Link to post
Share on other sites
Thatsgreat2345

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.

Share this post


Link to post
Share on other sites
SteveO

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

Share this post


Link to post
Share on other sites
Thatsgreat2345

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.

Share this post


Link to post
Share on other sites
SteveO

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.


Share this post


Link to post
Share on other sites
Thatsgreat2345

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.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.