It seems a few people are interested in my code, it is also apparent that some people are not familiar with PHP.
I’ve thrown together a simple script to demonstrate how it should work.
With regards to PHP, it’s a server side language and so you need to be running a web server that can interpret the language. I run my code on a shared hosting package you can see it in action at http://fifasearch.com, for those who just want to play I’d advise installing XAMP on your local machine and playing with the code on there.
Once you’ve set-up your testing environment (that can read php files) head over to my GitHub page and download the latest files. Put them in the root directory of you’re webserver (for XAMP that is “\xampp\htdocs”) then create a new file called search.php and copy the following code into it:
<?PHP //we let PHP know what other files //we will be using in this script require_once('connector.php'); require_once('tradeor.php'); require_once('eahashor.php'); require_once('searchor.php'); //enter your username, password, secret answer in the variables below //should look something like //$user = "ea@ea.com"; //$password = "password"; //$secret = "secretquestion"; $user = ""; $password = ""; $secret = ""; //we call the eaEncode function from the EAHashor file $e = new EAHashor(); $hash = $e->eaEncode($secret); //display the hash on the screen echo "Your Hash: " . $hash . "<br />"; $c = new Connector($user, $password, $hash); $info = $c->connect(); //display the connection info on the screen echo "<br />Your Connection Details:<br />"; echo $info['EASW_KEY'] . "<br />"; echo $info['EASF_SESS'] . "<br />"; echo $info['PHISHKEY'] . "<br />"; echo $info['XSID'] . "<br />"; //we call the playersearch function from the Searchor file $s = new Searchor($info['EASW_KEY'], $info['EASF_SESS'], $info['PHISHKEY'], $info['XSID']); //we pass $s->playersearch a lot of variables //1. what number to start searching at //2. how many results do I want to get back (max 15) //3. what level is the player //4. what formation am I looking for //5. what position do they play //6. what nationality are they //7. what league do they play in //8. what team do they play for //9. minimum bid (this is not your offer) //10. maximum bid (this is not your offer) //11. minimum Buy It Now (this is not your offer) //12. maximum Buy It Now (this is not your offer) $search = $s->playersearch(0,1,'gold','f442','attacker','9','13','144','','','',''); //display the search results on the screen echo "<br />A Single Search Result: <br />" ; var_dump($search); //we call the trade function from the Tradeor file //we pass $t-trade() a trade id to lookup $t = new Tradeor($info['EASW_KEY'], $info['EASF_SESS'], $info['PHISHKEY'], $info['XSID']); $trade = $t->trade(18629464); //to bid 200 on the trade above you would use $t->bid(18629464, 200); //display the trade details on the screen echo "<br /><br />A Single Trade Detail: <br />" ; var_dump($trade); ?>
Once you’ve done that, open your browser and point it at the search.php page and you should now see some output.
The searched for player is Berbatov, so you can work out the variables from that piece of information.
@Kevin: That’s where I’m stuck now too. I can run the script on https://utas.s2.fut.ea.com/ut/game/fifa13/user/credits successfully (I created a new function to test it), but searching for auctions returns:
string(54) “{“message”:null,”reason”:”expired session”,”code”:401}”
I found it! You need to change the aution house server. Change $searchurl in searchor.php to https://utas.s2.fut.ea.com/ut/game/fifa13/auctionhouse? instead of https://utas.fut.ea.com/ut/game/fifa13/auctionhouse?
Could it be that there is a problem with the $locale? I’m from germany and maybe I have to chance the locale variables from en-GB to sth. different. like de-dE.
tried this but it doesnt work too. maybe I’m doing it wrong. 🙂
Created a fully automated application.
Working with PHP, a SQL database and a cronjob which will activate the search.
I can specify a list of players (with specific formations) which the application will search for. For each player I have set a max price to buy it and the sell prices so it will automaticly auction it after. It will also clean up the trade pile after items are sold.
All thanks to the base of some code of Rob. Thanks!
I’ve been making hundreds of thousands a week with like 10 minutes a week.
Hi,
I hope you can help me.
I got some error messages in connector.php.
It says:
Notice: Undefined offset: 1 in F:\xampp\htdocs\connector.php on line XX
Here are the codelines with that error:
list($h, $EALOGIN) = explode(“\r\n\r\n”, $response, 2);
$s = explode(“:”, $r[7]);
$t = explode(“;”, $s[1]);
$m = explode(“:”, $r[8]);
$n = explode(“;”, $m[1]);
$b = explode(“”, $a[1]);
Notice: Trying to get property of non-object in F:\xampp\htdocs\connector.php on line XXX
This is the next error for the following lines:
$personaID = $d->userAccountInfo->personas[0]->personaId;
$platform = $d->userAccountInfo->personas[0]->userClubList[0]->platform;
Thank you.
Michael
Hey thanks for the code.
I have been able to port the code to Visual Basic 6.
the only problem now is which players should i look for to get money. lol
Hi.
Im still wondering, that it is not possible to read all comments.
Sometimes there is just 1 of the over 150.
markus the error continues….
.
Hi,
here is my output: http://pastebin.com/r4T9Ek3x
I hope somebody can help me 🙂
greets syme
Anyone got thins working ?? I would buy a working version .
Hi, I’m getting the error:
Undefined offset: 1 in connector.php on line 59
Any ideas?
Thank you,
Hi
I have a problem with this example.
When trying to login the $response = curl_exec($ch); is returning an empty string…
This is causing errors in the explode function therefore I cant login.
Why is this happening?
Thnx for the help!
@markus, help me pls, i pay you for help
email: crusade@live.it
Hi markus, I do not get to run the autobuyer, can you help me? thanks
Hey Kevin,
yes you have to change $locale to de_DE and also the $login to “https://www.ea.com/de/fussball/services/authenticate/login”
so far you can log in, but you won’t find any players….
Hello,
Im trying to get the code to work but keep getting some error’s, this one for example:
Notice: Undefined offset: 1 in C:\wamp\www\connector.php on line 58
Call Stack
# Time Memory Function Location
1 0.0019 377168 {main}( ) ..\search.php:0
2 0.0283 738136 Connector->connect( ) ..\search.php:26
Anyone an idea how to fix it? is the error in line 58 from the connector.php or on line 26 from the search.php?
Anyone with this script working using PS3 data?
Hi robb first off appreciate the work you are doing keep it up :). I have a friend who will make the autobuyer for me . However I have no clue how to explain it . Is it best for me to send him to your first fifa13 post? Thanks
I get an 404 error…
what am I doing wrong?
Warning: require_once(connector.php): failed to open stream: No such file or directory in C:\xampp\htdocs\search.php on line 4
Fatal error: require_once(): Failed opening required ‘connector.php’ (include_path=’.;C:\xampp\php\PEAR’) in C:\xampp\htdocs\search.php on line 4
how do i fix this error?
Hi!
I get “close” for var $EASF_SESS and it don’t connect, any ideas for resolve this?
Thanks!
Is there anyone else having trouble since friday?
Most time I get a session expired 401.
Maybe 1 of 10 runs is a success.
I’ve managed to work out most of this code, but I’m not sure what to insert when it asks for my connection details on line 28, can anyone help?
not working, i get this:
Your Hash: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Your Connection Details:
easf_sess_com= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
close
Content-Length: 0
A Single Search Result:
bool(false)
A Single Trade Detail:
string(54) “{“message”:null,”reason”:”expired session”,”code”:401}”
@markus not working since today. can you still access the webapp normally?
I want to get the autobuyer working so much. Can u help me please. Just a lil help please !
I want to get the autobuyer working so much. Can u help me please. Just a lil help please !!
Hi,
i’ve got a problem with the platform. My account is from PS3, if I log in with this script it says machine “card-360”. Where can I set it to “PS3” in this script?
Hey Rob, I’ve got a really big problem here.
I was using your code on a 360 platform. It worked really fine, when, i was supposed to change to a ps3 platform.
I’ve rewrote your connector class, and search class, using preg_match to grab the cookies, xsid, and nuc, instead of your explode string from response header.
The problem is, once i search for a player, i get the trade id.
Trying to bid on a player, but, there are 2 cases:
using https://utas.s2.fut.ea.com/ut/game/fifa13/trade/$card/bid;
i get {“debug”:””,”string”:”Bad Request”,”reason”:””,”code”:”460″} or {“debug”:””,”string”:”Permission Denied”,”reason”:””,”code”:”461″}
When i use the original link posted in your tradeor class, https://utas.fut.ea.com/ut/game/fifa13/trade/$card/bid;
i get: expired cookies, invalid cookies or w.e
Can you tell me what could be the trick inside? i can provide you the new connector class. I can’t seem to find whats wrong….
I’m using hacked SSL CA, cacert.pem from firefox.
Any pointers how to search by name, as per your demo?
Hello Everyone,
Have you got code working for all the 3 platforms? PC/PS3/360.
Is it good to have a web based AB or a desktop based AB built in C# or JAVA?
quelqu un peut m aider pour faire autobuyer s il vous plait
Hey Rob,
We can’t see all comments submitted. Are you able to approve those so that we can see?
Hi,
I’m having the same issue, I get a session expired 401.
Can anybody help with this?
Thanx!
Marten
Hi, Im spanish and Im trying to complete this script but i dont know how to do it. Thats my screen error of search.php:
________________________________________
Your Hash: 7585c41d59d3d53b906158f967f8cf70
Notice: Undefined offset: 1 in C:\xampp\htdocs\connector.php on line 71
Notice: Trying to get property of non-object in C:\xampp\htdocs\connector.php on line 127
Notice: Trying to get property of non-object in C:\xampp\htdocs\connector.php on line 127
Notice: Trying to get property of non-object in C:\xampp\htdocs\connector.php on line 127
Notice: Trying to get property of non-object in C:\xampp\htdocs\connector.php on line 128
Notice: Trying to get property of non-object in C:\xampp\htdocs\connector.php on line 128
Notice: Trying to get property of non-object in C:\xampp\htdocs\connector.php on line 128
Notice: Trying to get property of non-object in C:\xampp\htdocs\connector.php on line 128
Notice: Undefined offset: 6 in C:\xampp\htdocs\connector.php on line 192
Notice: Undefined offset: 1 in C:\xampp\htdocs\connector.php on line 193
Your Connection Details:
54352
EASW_KEY=c311e82e-f7af-4a9c-8ca6-90550728b5b4
Content-Length: 0
A Single Search Result:
string(25479) ”
AND THE PAGE OF EA WITH THE 404 EROR.
_____________________________________
THANKS.
Right guys,
The hash is obviously changing and is f**ked. Someone needs to figure this out pronto. I heard one of the guys trying a pull request on Mouseys Git code found it from inspecting the HTTP requests where you input the secret answer to your secret question. Anyone care to tell me where the hell this can be found on the FIFa site?!
Anyways… anyone with undefined offset one errors put this:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_CAINFO, getcwd() . ‘\cacert.pem’);
above any curl code that uses https requests (line 46 for example in connector.php)
Session keys get mixed up. Try:
$s = explode(“:”, $r[6]);
$t = explode(“;”, $s[1]);
$EASW_KEY = $t[0];
//Session Key
$m = explode(“:”, $r[7]);
$n = explode(“;”, $m[1]);
$EASF_SESS = $n[0];
as 7 then 8 returns ‘close’ for one of the keys. Machine type is wrong too.. use:
$d = json_decode($EAACCOUNT);
$machine = $d->shardInfo[1]->customdata1[1];
instead of 0, 0 in the arrays.
That should connect most of it except the last http request as the hashor is incorrect.
Hopefully this will fix everyone’s questions, in the meantime SOMEONE TELL ME HOW TO HASH THE SECRET ANSWER CORRECTLY!!
Great code though mate, lots of momentum to further develop on!!
Oh and download the cacert.pem file and place it in the same directory from where you are calling all this from. Someone placed the link to it in one of these threads, or in mouseys Git issue ques, can’t remember who’s advice that was…
Heck, why not just google it!
Hi,
First of all, thanks for the code Rob!
But i have a question. I am not experienced with PHP so i was wondering if you could do a tutorial or video tutorial on how to make the server + putting the codes toghether.
That would be amazing!
Kind regards,
Robert
hey there,
i´ve tried to run my own autobuyer as basic i used these codes but there are too many problems and i´m not so good in php i have only basics in sql and visual basic. have some one a working autobuyer for fifa 13 it would be nice if someone would contact me.
my email: bigboss990@hotmail.com
thank you
Sry to be a total noob, but is it worth even trying for someone who’s never done anything like this? Of course it will take a lot of time, but is it possible? 😛
Hi,
today while I was searching for a method to login into the fut webapp, I found this project here. As I was trying to use the code from above, I got the same problem as Derek mentioned before (Undefined offset: 1 in connector.php on line 59). Is there any chance to fix it or is here any further development going on?
Thx for help!
hi, i tried to build the autobuyer but i have the Undefined offset error. i think it something with the connection to the ea server? could someone help me with that? my e-mail is galtest@hotmail.de
Hi, Guys
can anyone help me run the autobuyer? will donate money to the person and some fifa coinage 🙂
Can anyone help me?
I get always “expired 401” error….
Would be great!