Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 17:56

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



HTTP requests

Discussion on HTTP requests within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 1908
Join Date: Jan 2013
Posts: 832
Received Thanks: 629
HTTP requests

Hello guys!

I want to create a simple script which will show me how much resources or soldiers I have on my game acount.

Game's name is Travian.

I have already tried to do it for several hours but it seems impossible for me. (I know how GET or POST works but I can't figure out how to do it. I watched many tuts but it didn't help me too).

This is what I have:

Code:
#include <WinHttp.au3>
#include <Array.au3>
#include <String.au3>
 
Global $user="ssamko"
Global $pass="autoit123"
 
Local $url=  BinaryToString(InetRead( "http://ts5.travian.sk/?lang=sk"  ))
$token=_StringBetween($url,'name="login" value="','"')
$token=$token[0]
 
 
$login_url="http://ts5.travian.sk/login.php"
$login= ObjCreate("WinHttp.WinHttpRequest.5.1")
$login_packet="name=ssamko&password=autoit123&s1=Login&w=1920%3A1080&login="&$token&"&lowRes=0"
$login.open("POST", $login_url)
$login.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
$login.send($login_packet)
$login.WaitForResponse()
$cookies = $login.getresponseheader("Set-Cookie")
 
ConsoleWrite($cookies&@CRLF&@CRLF)
Login page:

name: ssamko

password: autoit123


I want only script which will get data like amount of wood, gold or something like that+ finally I will learn how to do it (I play with autoit for about a year...but HTTP requests are my death )

I would be very thankful for help !
ssamko is offline  
Old 02/29/2016, 00:42   #2

 
Codesys's Avatar
 
elite*gold: 100
Join Date: Oct 2009
Posts: 348
Received Thanks: 20
Try This My english is very bad

Codesys is offline  
Thanks
1 User
Old 02/29/2016, 09:04   #3
 
elite*gold: 1908
Join Date: Jan 2013
Posts: 832
Received Thanks: 629
Quote:
Originally Posted by Benny.Sv View Post
Try This My english is very bad

You are my hero ! Thank you so much !
ssamko is offline  
Reply


Similar Threads Similar Threads
[Java] Grundlage aller böser Absichten im Web: Http Requests
01/17/2011 - Coding Tutorials - 0 Replies
Huhu liebe Community! Hatte in letzter Zeit viel Zeit. Naja, das fängt stil-technisch schon mal gaaaanz unschön an... Whatever, ich habe mich mit Package Bots und Brute Force Programmen beschäftigt; So habe ich min 4 Wochen lang an einem (SDS) Staemme Bot gearbeitet, das Projekt liegt mittlerweile auf Eis, wie fast alle Privatprojekte. An diese Stelle, falls wer Interesse an den Sourcen hat und mit meinem SpagetthiCode klarkommt, immer her mit den Anfragen... Grunlage all dieser aus...
Looking for informations on HTTP-Requests
08/24/2009 - Browsergames - 1 Replies
Hi @ all, I try to write a bot witch will train own Brutes. Unlike other bots is a list of weak opponents sorted according their levels. The Brute will then trained against opponents 2 levels lower as the own ones because that increase the chance of 2-point victories ;) There will be easy to edit lists for the weak opponents and the own brutes so that everyone may edit them for there own needs. So far so good, what I lack is simply the corresponding HTTP-requests and HTTP-responses...



All times are GMT +1. The time now is 17:57.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.