PHPackages                             relisoft/php-steam-user-library - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. relisoft/php-steam-user-library

ActiveLibrary

relisoft/php-steam-user-library
===============================

Steam PHP library for getting data from API

1.3(7y ago)41053[2 issues](https://github.com/Isigar/PHPSteam-User-library/issues)MITPHP

Since Jul 25Pushed 7y ago3 watchersCompare

[ Source](https://github.com/Isigar/PHPSteam-User-library)[ Packagist](https://packagist.org/packages/relisoft/php-steam-user-library)[ RSS](/packages/relisoft-php-steam-user-library/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (9)Dependencies (4)Versions (10)Used By (0)

PHPSteam-User-library
=====================

[](#phpsteam-user-library)

This library may help someone who want to use steam API and use it to fetch user data. With few lines of code you can fetch everything about user.

#### Install:

[](#install)

composer require relisoft/php-steam-user-library

### CONTENT:

[](#content)

- user summary
- friends
- game stats
- cache results
- recently played games
- inventory (with item details)
- login via steam

### TODO:

[](#todo)

- achievement
- trade support

How to use it?
--------------

[](#how-to-use-it)

#### HomepagePresenter

[](#homepagepresenter)

```
public function renderSingle()
{
    $player = new Player("76561198151608925");
    $request = new Request();
    $request->getPlayerFriends($player,2);
    $request->getPlayerRecentlyPlayedGames($player);
    $request->getPlayerInventory($player,Games::CSGO);
    Dumper::dump($player);
}
```

##### But what we do if we need cache results?

[](#but-what-we-do-if-we-need-cache-results)

> We will use new functions and we will load full user profile and system automaticly cache it. It's cache function call so if some result will be different it will automaticly reload data.

```
public function renderSingle()
{
    $player = new Player("76561198151608925");
    $request = new Request();
    $player = $request->getFullData($player); // This function will load full profile (profile, recent games, friends, inventory)
    $this->template->items = $player->getInventory()->getData();
}
```

#### Dump:

[](#dump)

[![Image of dump data](https://camo.githubusercontent.com/4a2cc13b3427b30feaa8d0ae0c8eaf065667534d89507913bad5c7540af11e05/68747470733a2f2f696d6167652e70726e747363722e636f6d2f696d6167652f726651687a557871524a65766f52636c707935654f772e706e67)](https://camo.githubusercontent.com/4a2cc13b3427b30feaa8d0ae0c8eaf065667534d89507913bad5c7540af11e05/68747470733a2f2f696d6167652e70726e747363722e636f6d2f696d6167652f726651687a557871524a65766f52636c707935654f772e706e67)

#### Getting / Setting data

[](#getting--setting-data)

> Every variable did you see above have get and set function within you can set every variable and get it too.

```
$player->getState()
$player->getLastlogoff()
$player->getFriends()
```

#### Persona state

[](#persona-state)

> Persona state is one class with you can translate value from API to english language or edit to html return value.

```
Relisoft\Steam\Src\API\PersonaState::getVerbState($player->getPersonaState())
```

Login
-----

[](#login)

### Login button:

[](#login-button)

> For this purpose i created Button class with two static function whitch will return source link to img.

```

Relisoft\Steam\Src\Login\Button::rectangle()
Relisoft\Steam\Src\Login\Button::square()
```

### Login function

[](#login-function)

> For this i created class Login whitch use $session to store user data. You have to add your source of $session or use default $\_SESSION. I did this because i am using nette/http in my all project with better session api.

###### Create instance

[](#create-instance)

```
$this->login = new Login($this->session->getSection("steam"));
OR
$this->login = new Login($_SESSION);
```

###### Usage

[](#usage)

```
public function handleLogin()
    {
        $login = $this->login;

        if($login->isLogged()) // If is use logged in
        {
            $this->flashMessage("User is logged."); //Flash message like echo
            $this->redirect("single",$this->session->getSection("steam")->user); // This you can edit for your purpose
        }
        else
        {
            $object = $login->auth(); // Auth user and return states

            if($object) //IF SUCCESS RETURN STEAM ID
            {
                $this->flashMessage("successfuly logged in $object"); //Echo some text
                $this->redirect("single",$object); // Redirect to another page with parameter $object -> returning STEAM ID
            }
            elseif($object == $login::FAILED)
            {
                $this->flashMessage("Steam is not logged in!"); //Echo that's failed
                $this->redirect("this"); //Redirect
            }
            elseif($object == $login::CANCEL) //Echo that's your cancel process
            {
                $this->flashMessage("Cancel by user");
                $this->redirect("this");
            }
        }
    }
```

##### Login states:

[](#login-states)

```
const CANCEL = "cancel";
const SUCCESS = "success";
const FAILED = "failed";
```

### Depency:

[](#depency)

- nette/utils
- nette/neon
- nette/caching
- PHP 5.4+

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~60 days

Recently: every ~121 days

Total

9

Last Release

2732d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/37aaf75bfe348f2d3cc231f68c5447f7f1c7038cada926a11e4859450363eb6a?d=identicon)[Isigar](/maintainers/Isigar)

---

Top Contributors

[![Isigar](https://avatars.githubusercontent.com/u/7609408?v=4)](https://github.com/Isigar "Isigar (22 commits)")

---

Tags

achievementsgamenettephpstatssteamsteam-extensionsteam-login-nette

### Embed Badge

![Health badge](/badges/relisoft-php-steam-user-library/health.svg)

```
[![Health](https://phpackages.com/badges/relisoft-php-steam-user-library/health.svg)](https://phpackages.com/packages/relisoft-php-steam-user-library)
```

###  Alternatives

[nette/php-generator

🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.5 features.

2.2k64.2M576](/packages/nette-php-generator)[nette/di

💎 Nette Dependency Injection Container: Flexible, compiled and full-featured DIC with perfectly usable autowiring and support for all new PHP features.

92140.6M1.4k](/packages/nette-di)[nette/code-checker

✅ Nette CodeChecker: A simple tool to check source code against a set of Nette coding standards.

881.7M6](/packages/nette-code-checker)[kdyby/translation

Integration of Symfony/Translation into Nette Framework

921.2M24](/packages/kdyby-translation)[brandembassy/slim-nette-extension

19190.2k](/packages/brandembassy-slim-nette-extension)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
