https://github.com/theimpossibleastronaut/php-sam
Basic SAMv3 implementation for I2P in PHP
https://github.com/theimpossibleastronaut/php-sam
i2p i2pd library php php7 sam
Last synced: 28 days ago
JSON representation
Basic SAMv3 implementation for I2P in PHP
- Host: GitHub
- URL: https://github.com/theimpossibleastronaut/php-sam
- Owner: theimpossibleastronaut
- License: mit
- Created: 2019-07-25T15:52:41.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2021-02-06T11:18:35.000Z (almost 5 years ago)
- Last Synced: 2025-10-09T22:34:47.811Z (30 days ago)
- Topics: i2p, i2pd, library, php, php7, sam
- Language: PHP
- Size: 34.2 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-i2p - php-sam - Basic SAMv3 implementation in PHP. (Libraries / SAM)
README
[](https://packagist.org/packages/theimpossibleastronaut/php-sam)
[](https://app.sourcelevel.io/github/theimpossibleastronaut/-/php-sam)
[](https://packagist.org/packages/theimpossibleastronaut/php-sam)
[](https://packagist.org/packages/theimpossibleastronaut/php-sam)
[](https://packagist.org/packages/theimpossibleastronaut/php-sam)
[](https://packagist.org/packages/theimpossibleastronaut/php-sam)
# php-sam
Implementation for the SAMv3 bridge in PHP.
(Based on the article ["So you want to write a SAM library"](http://geti2p.net/en/blog/post/2019/06/23/sam-library-basics))
Most basic features are implemented. Go ahead and play with the examples.
It's very basic as well. Requires PHP 7.2+.
```php
connect( false );
$sam->commandSAM( "HELLO VERSION MIN=3.0 MAX=3.1 \n" );
```
You can also use composer for this.
```
composer require theimpossibleastronaut/php-sam
```
And then use the autoloader:
```php
connect( false );
$sam->commandSAM( "HELLO VERSION MIN=3.0 MAX=3.1 \n" );
```
In order to run the tests, enable zend.assertions in your php.ini (don't do that in production) and run
```
php test/assert.php
```