2017 © Pedro Peláez
 

library connectors

Connectors for Fifa Ultimate Team 15.

image

fut/connectors

Connectors for Fifa Ultimate Team 15.

  • Wednesday, October 1, 2014
  • by ebess
  • Repository
  • 10 Watchers
  • 11 Stars
  • 107 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 3 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Connector class for mobile endpoint of Fifa 15 Ultimate Team. Also you can use composer to install the connectors, (*1)

composer.json, (*2)

    require {
        "fut/connectors": "1.0.*"
    }

Example: (also see example.php), (*3)

    <?php
    require_once __DIR__ . "/vendor/autoload.php";

    use GuzzleHttp\Client;
    use GuzzleHttp\Cookie\CookieJar;
    use GuzzleHttp\Subscriber\Cookie as CookieSubscriber;
    use Fut\Connector;
    use Fut\Request\Forge;

    /**
     * the connector will not export your cookie jar anymore
     * keep a reference on this object somewhere to inject it on reconnecting
     */
    $client = new Client();
    $cookieJar = new CookieJar();
    $cookieSubscriber = new CookieSubscriber($cookieJar);
    $client->getEmitter()->attach($cookieSubscriber);

    try {

        /**
         * there are two platforms at the the moment
         *
         * playstation: Forge::PLATFORM_PLAYSTATION
         * xbox: Forge::PLATFORM_XBOX
         *
         * also you can set different endpoints
         *
         * webapp: Forge::ENDPOINT_WEBAPP
         *
         */
        $connector = new Connector(
            $client,
            'your@email.com',
            'your_password',
            'secret_answer',
            Forge::PLATFORM_PLAYSTATION,
            Forge::ENDPOINT_WEBAPP
        );

        $export = $connector
            ->connect()
            ->export();

    } catch(Exception $e) {
        die('login failed' . PHP_EOL);
    }

    // example for playstation accounts to get the credits
    // 3. parameter of the forge factory is the actual real http method
    // 4. parameter is the overridden method for the webapp headers
    $forge = Fut\Request\Forge::getForge($client, '/ut/game/fifa15/user/credits', 'post', 'get');
    $json = $forge
        ->setNucId($export['nucleusId'])
        ->setSid($export['sessionId'])
        ->setPhishing($export['phishingToken'])
        ->getJson();

    echo "you have " . $json['credits'] . " coins" . PHP_EOL;

The Versions

01/10 2014

dev-master

9999999-dev

Connectors for Fifa Ultimate Team 15.

  Sources   Download

MIT

The Requires

 

by Eduard Bess

22/09 2014

1.0.1

1.0.1.0

Connectors for Fifa Ultimate Team 15.

  Sources   Download

MIT

The Requires

 

by Eduard Bess

22/09 2014

1.0.0

1.0.0.0

Connectors for Fifa Ultimate Team 15.

  Sources   Download

MIT

The Requires

 

by Eduard Bess