Download the PHP package hmennen90/php-steamworks without Composer

On this page you can find all versions of the php package hmennen90/php-steamworks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-steamworks

php-steamworks

Native PHP extension providing access to the Steamworks SDK via a flat C API.

Requirements

Installation

Via PIE (recommended)

PIE is the official PHP extension installer.

After installation, copy libsteam_api.dylib (macOS) or libsteam_api.so (Linux) from the SDK's redistributable_bin/ directory next to the built extension:

Note (Laravel Herd / custom PHP builds): If PIE fails to auto-install the .so due to a read-only filesystem, the build output still exists at ~/.pie/php*/vendor/hmennen90/php-steamworks/modules/steamworks.so. Copy it to your extension directory manually and use an absolute path in php.ini:

Manual build

  1. Download the Steamworks SDK and extract it.

  2. Build the extension:

  3. Copy the Steam shared library next to the extension (see PIE section above).

  4. Enable the extension in php.ini:

See INSTALL.md for detailed platform-specific instructions.

Quick Start

Available Functions

150 functions across 11 Steamworks interfaces. Full signatures with docblocks live in stubs/steamworks.php (IDE autocompletion).

Core

User

Friends

Stats & Achievements

Leaderboards (async — see below)

Async CallResults

Remote Storage (Cloud Saves)

Shared files (Remote Storage UGC)

A cloud file shared with steam_remote_file_share gets a UGC handle that can be attached to a leaderboard entry; anyone who downloads the entry can fetch the file.

Apps

Utils

Timeline (Game Recording)

Annotate the Steam Game Recording timeline. Most calls are fire-and-forget (bool); the two does_*_recording_exist calls are async (return a handle — poll steam_get_call_result). Verified against Steamworks SDK 1.65 (STEAMTIMELINE_INTERFACE_V004).

Workshop (UGC)

Subscribe/unsubscribe, create, submit and delete are async (poll steam_get_call_result).

Networking (P2P over the Steam relay)

Lobbies (Matchmaking)

Creating and joining are async (poll steam_get_call_result → lobby_created / lobby_entered); everything that happens in the lobby afterwards arrives through steam_matchmaking_get_events().

Leaderboards & async calls

Leaderboard calls (and other SteamAPICall_t-based APIs) are asynchronous: they return an integer handle. Poll steam_get_call_result($handle) each frame until it stops returning null:

See examples/leaderboard.php for a full round-trip.

Constants

SDK compatibility

Built and verified against Steamworks SDK 1.65, which is the minimum: the 1.65-only ISteamUtils calls are link-time dependencies. sdk/redistributable_bin/ already ships the matching Steam runtime libraries, so a default build needs no extra download.

Steam interfaces are resolved by version string at runtime rather than through the SDK's versioned SteamAPI_Steam*_vNNN() accessor symbols. Those accessors are version-locked link-time symbols, so every SDK release that bumps an interface breaks the build outright — SDK 1.65 removed SteamAPI_SteamUtils_v010. With the runtime lookup, an interface bump is a one-line change to a version table instead.

Old Steam clients

Where it is safe, an older interface version is accepted as a deprecated fallback; using one raises E_DEPRECATED once per process.

Interface Current Deprecated fallback
ISteamNetworkingSockets SteamNetworkingSockets013 (SDK 1.65+) SteamNetworkingSockets012 (SDK ≤ 1.64)
ISteamUtils SteamUtils011 (SDK 1.65+) none — see below

A fallback is only safe when the older interface has the same vtable layout: the flat SteamAPI_ISteamX_* functions inside libsteam_api call fixed vtable slots. SDK 1.65 removed two methods from the middle of ISteamUtils, so SteamUtils010 is not layout-compatible and is deliberately not accepted. A Steam client that offers only the old interface gets a clear E_WARNING ("the Steam client is older than this build") and a false return, rather than a call into the wrong vtable slot.

Since Steam clients update themselves, this only affects clients that have not run in a long time.

Deprecated functions

steam_utils_is_steam_deck() still works — it is now implemented on IsRunningOnSteamHardware() — but SDK 1.65 removed the underlying IsRunningOnSteamDeck() call, and it raises E_DEPRECATED. Valve's guidance is to avoid device checks entirely: use steam_utils_get_hardware_default_config() for graphics defaults, or a capability-specific query, so the game keeps behaving correctly on Steam hardware that did not exist when it shipped. Use steam_utils_get_hardware_type() only for analytics and diagnostics.

License

MIT


All versions of php-steamworks with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hmennen90/php-steamworks contains the following files

Loading the files please wait ...