Comments (20)
Please provide me your PHP code.
from php-fut-api.
Seems like it's missing some values from cookies. Have you tried gathering the curl object from the login class?
from php-fut-api.
https://utas.external.s2.fut.ea.com/ut/game/fifa17/trade/190797669347/bid
Accept:application/json
Accept-Encoding:gzip, deflate, br
Accept-Language:en,zh-CN;q=0.8,zh;q=0.6
Cache-Control:no-cache
Connection:keep-alive
Content-Length:11
Content-Type:application/json
Cookie:utag_main=v_id:015bf142e0e7000ce74c83375cbb0506d018c06500bd0$_sn:2$_ss:1$_st:1494578626160$_pn:1%3Bexp-session$ses_id:1494576826160%3Bexp-session; _nx_mpcid=745e0d75-e47d-4eb2-9d88-d54bfeb809ff
Host:utas.external.s2.fut.ea.com
Origin:https://www.easports.com
Pragma:no-cache
Referer:https://www.easports.com/iframe/fut17/bundles/futweb/web/flash/FifaUltimateTeam.swf?cl=165353
User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
X-HTTP-Method-Override:PUT
X-Requested-With:ShockwaveFlash/25.0.0.171
X-UT-Embed-Error:true
X-UT-PHISHING-TOKEN:8172032561996223974
X-UT-SID:927df96a-474a-4a78-a2e9-eaed7fd7d0f8
{"bid":200}
from php-fut-api.
can i use handler.php/sendRequest function to buy player?
from php-fut-api.
Array
(
[url] => https://utas.external.s2.fut.ea.com/ut/game/fifa17/trade/190849008774/bid
[content_type] => application/json;charset=utf-8
[http_code] => 200
[header_size] => 156
[request_size] => 899
[filetime] => -1
[ssl_verify_result] => 20
[redirect_count] => 0
[total_time] => 1.515
[namelookup_time] => 0
[connect_time] => 0.312
[pretransfer_time] => 1.219
[size_upload] => 11
[size_download] => 77
[speed_download] => 50
[speed_upload] => 7
[download_content_length] => 77
[upload_content_length] => 11
[starttransfer_time] => 1.515
[redirect_time] => 0
[redirect_url] =>
[primary_ip] => 95.138.141.11
[primary_port] => 443
[local_ip] => 169.254.92.207
[local_port] => 60898
[request_header] => POST /ut/game/fifa17/trade/190849008774/bid HTTP/1.1
Host: utas.external.s2.fut.ea.com
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Cookie: _nx_mpcid=251e71de-9202-42e5-b4c4-6f70fae0e23e;
Accept-Language: en-US,en;q=0.8
Cache-Control: no-cache
Accept: application/json
X-UT-Embed-Error: true
X-Requested-With: ShockwaveFlash/25.0.0.171
Referer: https://www.easports.com/iframe/fut17/bundles/futweb/web/flash/FifaUltimateTeam.swf?cl=165353
Content-type: application/json
X-UT-SID: 3f023b28-852f-4b3a-9312-701bdb9d5b6d
X-UT-PHISHING-TOKEN: 9165947517992578238
X-HTTP-Method-Override: PUT
Origin: https://www.easports.com
Pragma: no-cache
Content-Length: 11
)
request playload is : {"bid":200}
response:
Array
(
[debug] =>
[string] =>
[code] => 461
[reason] => Permission Denied
)
always got code 461 error ,why would be that? how to make it right? @JKetelaar
from php-fut-api.
my code :
$finalUrl = sprintf(URL::API_PLACE_BID,$tradeId);
$dataAry = array(
'bid' => (int)$buynowPrice+100
);
$dataStr = json_encode($dataAry);
$header = array(
'Content-type' => 'application/json',
'Accept' => 'application/json',
'Origin' => 'https://www.easports.com',
'Referer' => 'https://www.easports.com/iframe/fut17/bundles/futweb/web/flash/FifaUltimateTeam.swf?cl=165353',
'X-Requested-With' => 'ShockwaveFlash/25.0.0.171',
'X-UT-Embed-Error' => 'true',
'Pragma' => 'no-cache',
'DNT'=>null,
'Easw-Session-Data-Nucleus-Id'=>null,
'X-UT-Route'=>null,
'x-flash-version'=>null,
);
$item = $this->handler->sendRequest($finalUrl,Method::PUT(),$dataStr,$header,false,true);
this code was excuted after $api->login() func, compare to webapp's request infomation, no utag_main cookie string contain in my request, i also curl it without logged cookies.txt.
from php-fut-api.
the important thing is what's missing? i try to use "oczkers/fut" , got same premission denied error,is that ea changed auth way to prevent all bot actions? anyone knows? thanks very very much!
from php-fut-api.
Hmmm, this is somewhat related to the request to have a method to make requests to the trade market, regarding selling or buying (issue #44).
So I'll try to handle this either this weekend or the next, please stay tuned!
from php-fut-api.
okay,in the meantime,i will working on it too.
from php-fut-api.
I'am not a pro like you guys, but i will try to work on it too.
from php-fut-api.
Thanks for all the help and support guys, really appreciate it!
from php-fut-api.
First base has been added in commit #de1f624.
Use it like the following:
$handler = $api->getHandler();
/**
*/
$s = $handler->getSearcher()->searchFor(
ItemType::PLAYER(),
[],
150,
50
); // Just gathering some players
$x = $s[0]; // Just grabbing a random object from the possible trades
if ($x->getCurrentBid() >= 0 && $x->getCurrentBid() < 150) {
$handler->getTrader()->placeBid($x->getId(), 150);
}else{
echo('Bid is above our price.');
}
Composer:
composer require jketelaar/php-fut-api:dev-release/0.0.7
from php-fut-api.
excellent ! check it immediately!
from php-fut-api.
i just tried to use placebid function to buy a player , just still got 461 error message ,i wonder is that "temporary ban" rejected this request?
from php-fut-api.
What is the entire stacktrace? I had 461 a few times too and figured out it was because the player wasn't tradable (invalid price, already sold etc.)
from php-fut-api.
no stacktrace,request is successful but response is 461 error。what's invalid price?
i'm setting bid price equal to buynowprice,is that correct?
i wanna buy it now,so i use buynowprice to placebid,not a higher price than startprice to bid.
from php-fut-api.
What if you print the current bid of the trade and also print the current status of the trade.
from php-fut-api.
ok,i will try more ways to bid , see you around.
from php-fut-api.
[tradeState] => active
[buyNowPrice] => 700
[currentBid] => 0
[offers] => 0
[watched] =>
[bidState] => none
[startingBid] => 650
[confidenceValue] => 100
that's a typical form of trade data,hmm,seems to be normal.
"log in
Array ( [debug] => [string] => [code] => 461 [reason] => Permission Denied )"
this is bid response text,login successfully,bid error,can u try it to see got same error like mine or success response,so i can find out what's wrong with my code or my account indeed.
from php-fut-api.
Hmm very weird, I'll give it another shot tomorrow!
from php-fut-api.
Related Issues (20)
- Write tests for login
- Add documentation/examples
- unexpected '.', expecting ' HOT 16
- Function to relist tradepile? HOT 6
- How to access players sent to the tradepile? HOT 2
- Login HOT 1
- How to use the API?
- List Item function HOT 7
- get TradeID HOT 1
- Search for players HOT 7
- Session HOT 5
- Search for starting price and/or buy price HOT 1
- Use the same instance API on multiple pages. HOT 5
- thxxxxxxxxxxx! JKetelaar ,you are so great HOT 1
- totp_callback Function HOT 5
- Fatal Error when calling $handler->getTradepile() HOT 2
- FIFA 18 HOT 14
- SBCs HOT 3
- Hi , how to contact you? I want to invite you develop a project about fut api. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-fut-api.