SteveO Posted January 15, 2008 Share Posted January 15, 2008 (edited) 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 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 January 17, 2008 by SteveO Link to comment Share on other sites More sharing options...
SteveO Posted January 16, 2008 Author Share Posted January 16, 2008 Anyone? Link to comment Share on other sites More sharing options...
SteveO Posted January 16, 2008 Author Share Posted January 16, 2008 86 views and not 1 response.... Link to comment Share on other sites More sharing options...
weaponx Posted January 16, 2008 Share Posted January 16, 2008 I can't find this damn HTTP UDF. Link to comment Share on other sites More sharing options...
SteveO Posted January 17, 2008 Author Share Posted January 17, 2008 Yea, I can't find it in the search either for some reason. I always gotta go to Dale's Signature. He's got a link to it in there.It's Here.http://www.autoitscript.com/forum/index.php?showtopic=29631 Link to comment Share on other sites More sharing options...
Valuater Posted January 17, 2008 Share Posted January 17, 2008 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) Link to comment Share on other sites More sharing options...
SteveO Posted January 17, 2008 Author Share Posted January 17, 2008 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. Link to comment Share on other sites More sharing options...
SteveO Posted January 18, 2008 Author Share Posted January 18, 2008 Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 18, 2008 Share Posted January 18, 2008 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 Link to comment Share on other sites More sharing options...
SteveO Posted January 18, 2008 Author Share Posted January 18, 2008 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 spotThank you so much! Now would this work for actually submitting the form as well? Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 18, 2008 Share Posted January 18, 2008 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. Link to comment Share on other sites More sharing options...
SteveO Posted January 18, 2008 Author Share Posted January 18, 2008 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 More sharing options...
SteveO Posted January 18, 2008 Author Share Posted January 18, 2008 (edited) 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×tamp=1200636892") ;;Posting _HTTPGet($gaia, "/forum/compose/entry/new/********/") _HTTPGet($gaia, "/advertise/donators/?size=leaderboard") _HTTPGet($gaia, "/forum/pulse?id=169&ts=1200636863×tamp=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×tamp=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 January 18, 2008 by SteveO Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 18, 2008 Share Posted January 18, 2008 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×tamp=1200636892") ;;Posting _HTTPGet($gaia, "/forum/compose/entry/new/********/") _HTTPGet($gaia, "/advertise/donators/?size=leaderboard") _HTTPGet($gaia, "/forum/pulse?id=169&ts=1200636863×tamp=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×tamp=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 More sharing options...
SteveO Posted January 18, 2008 Author Share Posted January 18, 2008 (edited) 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 January 18, 2008 by SteveO Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 18, 2008 Share Posted January 18, 2008 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 More sharing options...
SteveO Posted January 18, 2008 Author Share Posted January 18, 2008 (edited) 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 January 18, 2008 by SteveO Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 18, 2008 Share Posted January 18, 2008 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 More sharing options...
SteveO Posted January 18, 2008 Author Share Posted January 18, 2008 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?EDITJust 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 More sharing options...
Thatsgreat2345 Posted January 19, 2008 Share Posted January 19, 2008 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?EDITJust 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 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