jketelaar / php-fut-api Goto Github PK
View Code? Open in Web Editor NEWThe perfect PHP FUT 17 API
License: GNU General Public License v3.0
The perfect PHP FUT 17 API
License: GNU General Public License v3.0
I am trying to list a player from my tradepile but with no success and I see there is no item listing function included. I suppose that's has something to do with sendRequestion().
This is the request the item listing function needs to make
POST /ut/game/fifa17/auctionhouse HTTP/1.1
Host: utas.external.s3.fut.ea.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Firefox/51.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Cookie: cookie
DNT: 1
Connection: keep-alive
Referer: https://www.easports.com/iframe/fut17/bundles/futweb/web/flash/FifaUltimateTeam.swf?cl=165353
Content-type: application/json
Accept: application/json
X-UT-PHISHING-TOKEN: token
X-UT-SID: id
X-UT-Embed-Error: true
X-HTTP-Method-Override: POST
Content-length: 84
{"startingBid":300,"duration":3600,"itemData":{"id":4444444444},"buyNowPrice":350}
Like this one.
Hi everyone,
i've used another API, which isn't working anymore unfortunately :(
So, I thought I could this API a try. I browsed a little through the source code, but couldn't find a method to relist the whole tradepile. Is there any or am I just too blind to see it?
I got this error:
Parse error: syntax error, unexpected '.', expecting ')
On this line:
/src/JKetelaar/fut/api/API.php on line 118
How to fix it?
Hi, trying to use the API, I get the following error:
Fatal error: Uncaught JKetelaar\fut\api\errors\login\MainLogin: Unable to login with unknown response With the following message: Peer certificate cannot be authenticated with given CA certificates: SSL certificate problem: unable to get local issuer certificate With error code: 60 in C:\xampp_7\htdocs\fut17\vendor\jketelaar\php-fut-api\src\JKetelaar\fut\api\user\Login.php:110 Stack trace: #0 C:\xampp_7\htdocs\fut17\vendor\jketelaar\php-fut-api\src\JKetelaar\fut\api\user\Login.php(90): JKetelaar\fut\api\user\Login->requestMain() #1 C:\xampp_7\htdocs\fut17\vendor\jketelaar\php-fut-api\src\JKetelaar\fut\api\API.php(114): JKetelaar\fut\api\user\Login->login() #2 C:\xampp_7\htdocs\fut17\index.php(8): JKetelaar\fut\api\API->login() #3 {main} thrown in C:\xampp_7\htdocs\fut17\vendor\jketelaar\php-fut-api\src\JKetelaar\fut\api\user\Login.php on line 110
Adding $curl->setOpt(CURLOPT_SSL_VERIFYPEER, false);
in /vendor/jketelaar/php-fut-api/src/JKetelaar/fut/api/user/Login.php
in setupCurl()
solves the problem, but, maybe it´s not the best way...
Thanks!
Fatal error: Uncaught exception 'JKetelaar\fut\api\errors\login\MainLogin' with message 'Unable to login with unknown response With the following message: Incorrect verification code With error code: 295712' in C:\xampp\htdocs\compo\src\JKetelaar\fut\api\user\Login.php:381 Stack trace: #0 C:\xampp\htdocs\compo\src\JKetelaar\fut\api\user\Login.php(98): JKetelaar\fut\api\user\Login->postTwoFactorForm('https://signin....') #1 C:\xampp\htdocs\compo\src\JKetelaar\fut\api\API.php(123): JKetelaar\fut\api\user\Login->login() #2 C:\xampp\htdocs\compo\examples\login.php(8): JKetelaar\fut\api\API->login() #3 {main} thrown in C:\xampp\htdocs\compo\src\JKetelaar\fut\api\user\Login.php on line 381
Please help... I need help urgent
Thanks in advance.
How to search for starting price and/or buy now price. They are not in the Parameter.php.
class Parameter extends ImprovedEnum {
const LEAGUE = 'leag';
const CHEMISTRY_STYLE = 'playStyle';
const TEAM = 'team';
const MIN_BUY = 'minb';
const MAX_BUY = 'maxb';
const MIN_BID = 'micr';
const MAX_BID = 'macr';
const DEFINITION_ID = 'definitionId';
const MASKED_DEFINITION_ID = 'maskedDefId';
const LEVEL = 'lev';
const ZONE = 'zone';
const POSITION = 'pos';
}
So i want the array of all players with staringPrice X and buyNowPrice X.
Rename namespace to something more logical:
JKetelaar\fut\bot
=> JKetelaar\fut\api
Let's see if this is possible
Hi, trying to use the APi, I get the following error:
Fatal error: Uncaught JKetelaar\fut\api\errors\login\MainLogin: Unable to login with unknown response With the following message: Incorrect verification code With error code: 295712 in C:\xampp_7\htdocs\fut17\vendor\jketelaar\php-fut-api\src\JKetelaar\fut\api\user\Login.php:377 Stack trace: #0 C:\xampp_7\htdocs\fut17\vendor\jketelaar\php-fut-api\src\JKetelaar\fut\api\user\Login.php(94): JKetelaar\fut\api\user\Login->postTwoFactorForm('https://signin....') #1 C:\xampp_7\htdocs\fut17\vendor\jketelaar\php-fut-api\src\JKetelaar\fut\api\API.php(114): JKetelaar\fut\api\user\Login->login() #2 C:\xampp_7\htdocs\fut17\index.php(8): JKetelaar\fut\api\API->login() #3 {main} thrown in C:\xampp_7\htdocs\fut17\vendor\jketelaar\php-fut-api\src\JKetelaar\fut\api\user\Login.php on line 377
Using the example in the readme, I´m changing:
It´s this correct??
Each time I try the login and get the error, I receive an email with the security code
Thanks!!
Is it possible to use the same API instance, storing it in some way?
I'm trying to store the int within _SESSION, but failed.
Will I have to log in to the API instance for each page?
$api = new \JKetelaar\fut\api\API(
$creds[ 'username' ], $creds[ 'password' ], $creds[ 'secret' ], $creds[ 'key' ], $creds[ 'platform' ]
);
$api->login();
$_SESSION['API'] = $api;
how to buy a player
It started 3 hours ago.
$handler = $api->getHandler();
foreach($handler->getTradepile() as $trade) {
// Interact with $trade here
}
will result in
Fatal error: Uncaught exception 'BadMethodCallException' with message 'No static method or enum constant '_DEFAULT' in class JKetelaar\fut\api\market\items\ItemType' in C:\xampp\htdocs\ea\vendor\myclabs\php-enum\src\Enum.php:184 Stack trace: #0 C:\xampp\htdocs\ea\src\JKetelaar\fut\api\ImprovedEnum.php(33): MyCLabs\Enum\Enum::__callStatic('_DEFAULT', Array) #1 C:\xampp\htdocs\ea\src\JKetelaar\fut\api\ImprovedEnum.php(33): JKetelaar\fut\api\ImprovedEnum::_DEFAULT() #2 C:\xampp\htdocs\ea\src\JKetelaar\fut\api\market\trading\ItemData.php(141): JKetelaar\fut\api\ImprovedEnum::findByKey('gkCoach', true) #3 C:\xampp\htdocs\ea\src\JKetelaar\fut\api\market\trading\Trade.php(125): JKetelaar\fut\api\market\trading\ItemData::toObject(Array) #4 C:\xampp\htdocs\ea\src\JKetelaar\fut\api\market\Handler.php(144): JKetelaar\fut\api\market\trading\Trade::toObject(Array) #5 C:\xampp\htdocs\ea\sell.php(16): JKetelaar\fut\api\market\Handler->getTradepile() #6 {main} thrown in C:\xampp\htdocs\ea\vendor\myclabs\php-enum\src\Enum.php on line 184
Any clues?
Something with Slate maybe
I'm getting an error while I'm trying to login
Message: Unable to login with unknown response With the following message: Peer certificate cannot be authenticated with given CA certificates: SSL certificate problem: unable to get local issuer certificate
With error code: 60
What exactly is this SECRET. I believe this is not the secret answer of my FUT account. Should I use one of the backup codes?
function totp_callback() {
$totp = new \OTPHP\TOTP('FIFA', 'SECRET');
return $totp->now();
}
Since now we are able to complete SBCs via the web-app it will be great to be able to auto-complete SBCs like the GOLD UPGRADE SBC. Like select some random 75-78 non rare cards and submit them.
ERROR:
Fatal error: Uncaught JKetelaar\fut\api\errors\login\MainLogin: Unable to login with unknown response With the following message: Page not matching login form page () With error code: 281658 in C:\xampp\htdocs\rangos\src\JKetelaar\fut\api\user\Login.php:352 Stack trace: #0 C:\xampp\htdocs\rangos\src\JKetelaar\fut\api\user\Login.php(96): JKetelaar\fut\api\user\Login->postLoginForm('https://signin....') #1 C:\xampp\htdocs\rangos\src\JKetelaar\fut\api\API.php(123): JKetelaar\fut\api\user\Login->login() #2 C:\xampp\htdocs\rangos\prueba2.php(8): JKetelaar\fut\api\API->login() #3 {main} thrown in C:\xampp\htdocs\rangos\src\JKetelaar\fut\api\user\Login.php on line 352
CODE:
$api = new \JKetelaar\fut\api\API('[email protected]', 'XXX', 'XXX', 'email_callback', 'ps4', true);
if($api->login() === true) {
echo('We\'re logged in!');
}
function email_callback() {
return '84505842';
}
I'm running this code on localhost/Xampp. Installed this plugin with composer.
Thanks in advance :)
I am trying to get the PlayerIDs (not the MaskedID or ResourceId as EA call it) of all the players that I sent to the tradepile. I managed to get the ResourceId of each card but how do I access the getBaseId() from the Player Class from here?
This is my current code:
if($api->login() === true) {
echo('We\'re logged in!' . "\n");
$handler = $api->getHandler();
foreach($handler->getTradepile() as $trade => $value) {
if ($value->getItemData()->getItemType() == "player") {
echo $value->getItemData()->getResourceId()."<br />";
}
}
}
Now it is:
const X_UT_ROUTE = 'https://utas.external.fut.ea.com'; (vendor/jketelaar/php-fut-api/src/JKetelaar/fut/bot/config/Configuration.php:19)
another way got: 500 Internal
Hi , how to contact you? I want to invite you develop a project about fut api.
It it possible to store the session? So I don't have to log in every time i refresh the page.
I got an error with the example login php. The error is on line 188 of API.php. What does the line mean?
public function login($path = DATA_DIR . '/cookies.txt') {
I'am also not understanding this line of the bootstrap.php
define('DATA_DIR', (($dir = drush_server_home()) === null ? __DIR__ : $dir) . '/.fut-bot/data/');
Please help!
Hello,
I am very interested about your project, and I am ready to help you test and to propose improvements .. but I don't know how use the BOT.. is a bit new for me with this system node. exe
Can you give us a more detailed tutorial?
Thank you
I'am doing something wrong right?
if($api->login() === true) {
$searcher = $api->getHandler()->getSearcher();
$players = $searcher->searchFor(\JKetelaar\fut\api\market\items\ItemType::PLAYER(), [], 0, 50);
echo $players;
}
No error's but only echo the word array.
Please someone help me, tell me how to login? It should be run on a server and displayed on browser right? Other programs needed? (Already installed with composer).
Could someone share some code?
UPDATE: solved by changing PHP version.
README contains instruction to install NodeJS.
This is not required anymore.
nothing but love you!1 @JKetelaar
We currently have a few things to be done, so feel free to contribute:
composer require jketelaar/php-fut-bot
can be used)Hey,
Thanks for your great stuff, it's pretty cool to use it. Btw, it should be nice to implements connection with mobile api, so we could login with when we get temporary banned with webapp connection.
Thx again & great job !
PS: I'll try to do some pull requests soon, I have some idea to improve a little bit this tool
How to get the TradeID of an active player auction?
Write tests for login and let Travis test these every so-what-hours.
This will notice me/us on time, instead of users figuring out their errors.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.