Giter Site home page Giter Site logo

how to buy a player about php-fut-api HOT 20 OPEN

jketelaar avatar jketelaar commented on August 28, 2024
how to buy a player

from php-fut-api.

Comments (20)

ToniKuipers avatar ToniKuipers commented on August 28, 2024 1

Please provide me your PHP code.

from php-fut-api.

JKetelaar avatar JKetelaar commented on August 28, 2024 1

Seems like it's missing some values from cookies. Have you tried gathering the curl object from the login class?

from php-fut-api.

vinch1n avatar vinch1n commented on August 28, 2024

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.

vinch1n avatar vinch1n commented on August 28, 2024

can i use handler.php/sendRequest function to buy player?

from php-fut-api.

vinch1n avatar vinch1n commented on August 28, 2024

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.

vinch1n avatar vinch1n commented on August 28, 2024

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.

vinch1n avatar vinch1n commented on August 28, 2024

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.

JKetelaar avatar JKetelaar commented on August 28, 2024

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.

vinch1n avatar vinch1n commented on August 28, 2024

okay,in the meantime,i will working on it too.

from php-fut-api.

ToniKuipers avatar ToniKuipers commented on August 28, 2024

I'am not a pro like you guys, but i will try to work on it too.

from php-fut-api.

JKetelaar avatar JKetelaar commented on August 28, 2024

Thanks for all the help and support guys, really appreciate it!

from php-fut-api.

JKetelaar avatar JKetelaar commented on August 28, 2024

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.

vinch1n avatar vinch1n commented on August 28, 2024

excellent ! check it immediately!

from php-fut-api.

vinch1n avatar vinch1n commented on August 28, 2024

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.

JKetelaar avatar JKetelaar commented on August 28, 2024

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.

vinch1n avatar vinch1n commented on August 28, 2024

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.

JKetelaar avatar JKetelaar commented on August 28, 2024

What if you print the current bid of the trade and also print the current status of the trade.

from php-fut-api.

vinch1n avatar vinch1n commented on August 28, 2024

ok,i will try more ways to bid , see you around.

from php-fut-api.

vinch1n avatar vinch1n commented on August 28, 2024

[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.

JKetelaar avatar JKetelaar commented on August 28, 2024

Hmm very weird, I'll give it another shot tomorrow!

from php-fut-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.