Skip to content

Commit c3fb4ec

Browse files
committed
Update README.md
* add requirements * add install instructions
1 parent 6d19794 commit c3fb4ec

File tree

1 file changed

+39
-6
lines changed

1 file changed

+39
-6
lines changed

README.md

+39-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
<!-- TOC -->
66
* [1. Purpose](#1-purpose)
77
* [2. Example](#2-example)
8-
* [3. Usage](#3-usage)
9-
* [4. License](#4-license)
8+
* [3. Requirements](#3-requirements)
9+
* [4. Installation](#4-installation)
10+
* [5. Usage](#5-usage)
11+
* [6. License](#6-license)
1012
<!-- TOC -->
1113

1214
## 1. Purpose
@@ -24,7 +26,37 @@ client if this is supported by the game.
2426

2527
[![Example Signature][5]][6]
2628

27-
## 3. Usage
29+
## 3. Requirements
30+
31+
* PHP 8.x
32+
* `mbstring` extension for handling international characters and emojis
33+
* `GD` extension for rendering the images
34+
* [Composer][7]
35+
* basic knowledge of executing shell commands on a server
36+
37+
**Note:** The only **officially** supported way to install this package is via
38+
Composer. However, it is theoretically possible to install PHP 8 and Composer
39+
on a local computer, run the installation there and then upload the `vendor`
40+
folder created by Composer to the server, in case shell access is not available.
41+
42+
## 4. Installation
43+
44+
**Important:** This package uses the [Composer][7] dependency manager for
45+
PHP to check system requirements and to install package dependencies. Please
46+
make sure it is installed before trying to use this package.
47+
48+
The following example assumes that your web server is running under the user
49+
account `www-data`, that `composer` is installed into the system `$PATH`, and
50+
that you have a working `sudo` setup to run shell commands as a different user.
51+
52+
In this case, you simply have to run this command within the same directory
53+
which contains this `README.md` on your server:
54+
55+
```bash
56+
sudo -u www-data composer install
57+
```
58+
59+
## 5. Usage
2860

2961
A basic approach at using this package could look like this:
3062

@@ -62,7 +94,7 @@ $signature->getLinkTarget();
6294
The example above should be mostly self-explanatory.
6395

6496
The `API` class must be initialized with a personalized API key. You can obtain
65-
your API key from the [Steam developer website][7].
97+
your API key from the [Steam developer website][8].
6698

6799
The `API` class is a very limited implementation of the Steam Web-API and is not
68100
supposed to be used directly, except for one method:
@@ -90,7 +122,7 @@ The `Signature` class provides two public methods:
90122
An example implementation of this script can be found in the [`src/www/`](src/www)
91123
folder.
92124

93-
## 4. License
125+
## 6. License
94126

95127
See [LICENSE.txt](LICENSE.txt) for full license details.
96128

@@ -101,4 +133,5 @@ See [LICENSE.txt](LICENSE.txt) for full license details.
101133
[4]: https://partner.steamgames.com/documentation/community_data
102134
[5]: src/data/images/example.png
103135
[6]: https://steamcommunity.com/id/randomhosttv
104-
[7]: http://steamcommunity.com/dev
136+
[7]: https://getcomposer.org
137+
[8]: http://steamcommunity.com/dev

0 commit comments

Comments
 (0)