Skip to content

Commit 32b85c3

Browse files
committed
Improved documentation
1 parent 0c195c9 commit 32b85c3

File tree

1 file changed

+36
-32
lines changed

1 file changed

+36
-32
lines changed

README.md

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
PHP: **7.2.5+, 8.0+**, current release: **2.1.2** build 2022-04-28
1+
Release: **2.1.3** | build: **2024.08.26** | PHP: **^7.2.5|^8.0**
22

33
# Ultra Small Proxy 2
44

5-
**Ultra Small Proxy is a light-weight proxy written in PHP.**
5+
**Ultra Small Proxy is a lightweight proxy written in PHP.**
66

7-
## How to install:
7+
## How to install
88
```
99
composer require szczyglis/php-ultra-small-proxy
1010
```
11-
## Features:
11+
## Features
1212
- Proxy server written in PHP
13-
- Easy usage and integration
14-
- Simple and light-weight
13+
- Easy to use and integrate
14+
- Simple and lightweight
1515
- Sessions support
16-
- Sending and receiving cookies
17-
- Sending and receiving HTTP headers
18-
- Cache and assets storage
16+
- Supports sending and receiving cookies
17+
- Supports sending and receiving HTTP headers
18+
- Cache and asset storage
1919
- Domain and IP/host connection support
2020
- HTTP Basic Auth support
21-
- GET and POST connections
22-
- Forms submiting support
23-
- POST variables redirecting
24-
- Toolbar with address bar, configuration and debugger
25-
- URLs rewriting/proxying at runtime (links, images, css, javascript, etc.)
26-
- 2 different methods for URLs rewriting: Regex (with preg_replace) and XML (with libxml/DOM)
27-
- PHP 7.2.5+|8.0+ supported
21+
- GET and POST request handling
22+
- Form submission support
23+
- POST variable redirection
24+
- Toolbar with address bar, configuration, and debugger
25+
- URLs rewritten/proxied at runtime (links, images, CSS, JavaScript, etc.)
26+
- Two different methods for URL rewriting: Regex (with preg_replace) and XML (with libxml/DOM)
27+
- Supports PHP 7.2.5+ and 8.0+
2828

29-
## Requirements:
29+
## Requirements
3030

31-
- PHP 7.2.5+ with CURL and XML extensions
31+
- PHP 7.2.5+ or 8.0+ with CURL and XML extensions
3232
- Composer - https://getcomposer.org/
3333

3434

35-
## Usage example:
35+
## Usage example
3636
```php
3737
<?php
3838
// app.php
@@ -49,16 +49,16 @@ $proxy = new UltraSmallProxy($config);
4949
echo $proxy->load('https://github.com'); // <-- specify start page here
5050

5151
```
52-
Make sure to have write permissions to `./cookies` and `./cache` directories.
52+
Ensure you have write permissions to the `./cookies` and `./cache` directories.
5353

54-
### BE CAREFUL: directory with cookies should not be available to the public!
54+
### WARNING: The cookies directory should not be publicly accessible!
5555

56-
## Screenshot:
56+
## Screenshot
5757

5858
![proxy](https://user-images.githubusercontent.com/61396542/155353063-fde84995-6e43-46c4-8a1c-b8b4772e6dfc.png)
5959

6060

61-
Open `loopback.php` if you want to test proxy features like sessions support, POST vars redirecting, form submiting and more, e.g.:
61+
Open `loopback.php` if you want to test proxy features such as session support, POST variable redirection, form submission, and more, e.g.:
6262
```php
6363
<?php
6464

@@ -71,10 +71,10 @@ $output = $proxy->load('http://localhost/loopback.php');
7171

7272
- `index.php` - usage example
7373

74-
- `loopback.php` - loopback for test features like session support, form vars sending, and cookies redirecting
74+
- `loopback.php` - loopback for testing features like session support, form variable sending, and cookie redirection
7575

7676

77-
## Basic usage:
77+
## Basic usage
7878

7979
```php
8080

@@ -87,12 +87,12 @@ $proxy = new UltraSmallProxy($config);
8787
echo $proxy->load('https://github.com');
8888
```
8989

90-
## Configuration:
90+
## Configuration
9191

9292
```php
9393
$output = $proxy->load('https://github.com', $force = false);
9494
```
95-
boolean `$force` - if set to `false` then URLs given from QUERY STRING are always overwriting URLs passed here, set to `true` if you want to reverse this behaviour, default: `false`
95+
Boolean `$force` - if set to `false`, URLs given in the QUERY STRING will always overwrite URLs passed here. Set to `true` to reverse this behavior. Default: `false`.
9696

9797

9898
## Config values:
@@ -146,7 +146,7 @@ Before page load:
146146
**$config->set('htaccess_pass', 'pass')** - `string`, HTTP AUTH password
147147

148148

149-
## Public methods:
149+
## Public methods
150150

151151
After page load:
152152

@@ -165,15 +165,19 @@ After page load:
165165

166166
Other methods:
167167

168-
**$parsed = $proxy->render($html)** - parse/rewrite URLs in custom html content with selected `$rewriteMode`
168+
**$parsed = $proxy->render($html)** - parses/rewrites URLs in custom HTML content with the selected `$rewriteMode`.
169169

170170
---
171171

172172
### Changelog
173173

174-
- `2.1.0` -- package was added to packagist (2022-04-23)
175-
- `2.1.1` -- updated PHPDoc (2022-04-25)
176-
- `2.1.2` -- composer.json updated (2022-04-28)
174+
`2.1.0` -- Package was added to Packagist (2022-04-23)
175+
176+
`2.1.1` -- Updated PHPDoc (2022-04-25)
177+
178+
`2.1.2` -- Updated composer.json (2022-04-28)
179+
180+
`2.1.3` -- improved documentation (2024-08-26)
177181

178182
---
179183
**Ultra Small Proxy is free to use, but if you like it, you can support my work by buying me a coffee ;)**

0 commit comments

Comments
 (0)