Download the PHP package cyvax/privatebin_php without Composer
On this page you can find all versions of the php package cyvax/privatebin_php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cyvax/privatebin_php
More information about cyvax/privatebin_php
Files in cyvax/privatebin_php
Package privatebin_php
Short Description PHP client library for PrivateBin with client-side encryption and decryption support.
License MIT
Homepage https://github.com/cyvax/Privatebin_PHP
Informations about the package privatebin_php
Privatebin_PHP
PHP client library for PrivateBin.
Supports:
- Modern camelCase API (
PrivatebinPHP) - Original snake_case API (
PrivatebinSnakeCase) - Optional pipe-style helpers (
PrivatebinPHPPipe) - Attachments
- Password-protected pastes
- Burn-after-reading
- Discussions
- Compression
- Custom formatters
- SSL verification control
- PHP 7.1+ compatibility
Installation
Default Instance
By default, the library is configured to use:
You can override it with setUrl() or via constructor options.
Usage
Modern camelCase API
Factory method
PrivatebinPHP::init() supports named parameters for a more concise setup on PHP 8+:
Original snake_case API
[!NOTE]
PrivatebinSnakeCaseis also available as the alias\Cyvax\PrivatebinPHPfor compatibility with older versions of the library.
Constructor Options
Both clients accept an options array in their constructor:
Attachments
[!NOTE]
setAttachment()throwsPrivatebinExceptionif the file cannot be read.
An optional second argument overrides the attachment filename:
SSL Verification
SSL verification is enabled by default. Disable it only for local or self-signed instances:
The ssl_verify key is also accepted in the constructor options array and in PrivatebinPHP::init().
Pipe-style API
PrivatebinPHPPipe provides functional-style helper closures.
On PHP versions supporting the pipe operator:
Without pipe support, it is recommended to use PrivatebinPHP or PrivatebinSnakeCase directly.
If needed, closures can still be invoked manually:
Fetching and Decrypting
Interfaces
| Interface | Namespace | Used by |
|---|---|---|
PrivatebinClientInterface |
Cyvax\Contracts |
PrivatebinPHP (camelCase) |
PrivatebinSnakeCaseClientInterface |
Cyvax\Contracts |
PrivatebinSnakeCase |
Type-hint against an interface when you want to swap implementations:
Features
- AES-256-GCM encryption
- PBKDF2 SHA-256 key derivation
- Zlib compression support
- Attachments support
- Password-protected pastes
- Burn-after-reading support
- Discussions support
- Multiple formatter support
- SSL verification control
- Fluent API
- Functional pipe helpers
- PHP 7.1+ compatible
Documentation
See the Wiki for full documentation.
License
This project is licensed under the MIT license.
See LICENSE.
All versions of privatebin_php with dependencies
ext-curl Version *
ext-json Version *
ext-openssl Version *