承接 fut/connectors 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fut/connectors

Composer 安装命令:

composer require fut/connectors

包简介

Connectors for Fifa Ultimate Team 15.

README 文档

README

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

composer.json

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

Example: (also see example.php)

    <?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;

统计信息

  • 总下载量: 117
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 13
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 9
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-05-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固