PHPackages                             frdl/smoke-share - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. frdl/smoke-share

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

frdl/smoke-share
================

Smoke-Share Client forked from cyvax/privatebin\_php with additional features.

00PHP

Since Jul 16Pushed 10mo agoCompare

[ Source](https://github.com/frdl/smoke-share)[ Packagist](https://packagist.org/packages/frdl/smoke-share)[ RSS](/packages/frdl-smoke-share/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Smoke Share
-----------

[](#smoke-share)

This is an api client for [PrivateBin](https://github.com/PrivateBin/PrivateBin/) written on PHP.

**Smoke-Share Client forked from [Privatebin\_PHP `cyvax/privatebin_php`](https://github.com/cyvax/Privatebin_PHP).**

What's new?
-----------

[](#whats-new)

In this fork I add the additional features and options provided by Smoke Share which are not in the Privatebin\_PHP base class:

- **IP restriction (optional)**: The new field `allowedips` in the meta-section allows to send a comma seperated list of IP addresses. ONLY the given IPs are allowed to view the paste, any other clients cannot get the secret. If kept blank this option is disabled and EVERY client can get the paste.
- **Authorization (optional)**: Authorization will be added to the API (ToDo). Some features, e.g. never expire forever pastes, or less rate limits, will be restricted to registered and authorized clients. This will be added later, and if done, restrictions are applied if no token is send or if it is invalid, e.g. then the paste will be forced to have a time-limit or the client gets a lower traffic rate, or the max size will be limited.

Installing
----------

[](#installing)

Via composer: `composer require frdl/smoke-share`

[Source code at Github](https://github.com/frdl/smoke-share)

Dependencies
------------

[](#dependencies)

[Tuupola Base58](https://github.com/tuupola/base58) : a Base58 encoder by Tuupola

Usage
-----

[](#usage)

By default Smoke Share configured to use `https://smoke.tel/share/` for sending and receiving pastes.

You can parse config to a PrivatebinPHP object.

Example :
fast one with options passed as argument on creation :

```
use Frdlweb\SmokeShare;

$private =new SmokeShare(array(
    "url" => "https://smoke.tel/share/",
    "text" => "Because ignorance is bliss!",
    "allowedips" => implode(',', [$_SERVER['SERVER_ADDR'], $_SERVER['REMOTE_ADDR']]),
));
$posted = $private->encode_and_post();
```

It will send string `Because ignorance is bliss!` to [Smoke Share](https://smoke.tel/share/).

Check [Wiki](https://github.com/cyvax/Privatebin_PHP/wiki) for documentation.
The following methods where added by this fork:

Require valid SSL certificate
-----------------------------

[](#require-valid-ssl-certificate)

Should the PrivateBin Instance be required to have a valid ssl certificate?

```
public function set_ssl(bool $verify)
```

```
// $private->set_ssl(false); // NOT recommended!
$private->set_ssl(true);   // default
```

IP restriction by whitelist
---------------------------

[](#ip-restriction-by-whitelist)

Optionally you can specify one ore more IP addresses which are allowed to get, read and decrypt the paste. Any client with an IP not listed in this list will not be able to get the paste. The default value is empty and this restriction is disabled. *This feature is available in my own fork ONLY and will not be supported by most privatebin instances so far!*

```
public function set_ips(string | array $ips)
```

```
$private->set_ips([$_SERVER['SERVER_ADDR'], $_SERVER['REMOTE_ADDR'], '8.8.8.8', 'IP of authorized reciever, invalid IPs are ignored']);
```

Send an Authorization header to the API
---------------------------------------

[](#send-an-authorization-header-to-the-api)

Optionally you can send an Authorization header along with the HTTP-Request to the privatebin server.

```
Authorization: [TYPE] [TOKEN]

```

This can be used optionally to request rate limit rates or features like never expire pastes from the server.

```
 public function set_token(string $token, string $type = 'Bearer')
```

```
$private->set_token('abc123...', 'Basic');
```

GET and decrypt a paste \[TODO\]
--------------------------------

[](#get-and-decrypt-a-paste-todo)

Unfortunately [this is not working yet](https://github.com/frdl/smoke-share/blob/6977a9f020bb490ee3358d1eb0876b7a795483e6/src/SmokeShare.php#L242C2-L242C71). Maybe anyone can help further?

```
public function privatebin_get(string $url, ?string $password = null)
```

License
-------

[](#license)

This project is licensed under the MIT license, which can be found in the file [LICENSE](https://github.com/cyvax/Privatebin_PHP/blob/master/LICENSE) in the root of the project source code.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 Bus Factor1

Top contributor holds 58.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/831c50002c08bb751b698844c98cd6b36897678268b47f1f872a30f4e192ac22?d=identicon)[webfan](/maintainers/webfan)

---

Top Contributors

[![cyvax](https://avatars.githubusercontent.com/u/27162110?v=4)](https://github.com/cyvax "cyvax (30 commits)")[![nhoag](https://avatars.githubusercontent.com/u/1390106?v=4)](https://github.com/nhoag "nhoag (11 commits)")[![wehowski](https://avatars.githubusercontent.com/u/2658030?v=4)](https://github.com/wehowski "wehowski (10 commits)")

### Embed Badge

![Health badge](/badges/frdl-smoke-share/health.svg)

```
[![Health](https://phpackages.com/badges/frdl-smoke-share/health.svg)](https://phpackages.com/packages/frdl-smoke-share)
```

###  Alternatives

[spatie/laravel-personal-data-export

Create personal data downloads in a Laravel app

550543.8k8](/packages/spatie-laravel-personal-data-export)[kodicomponents/navigation

The KodiCMS Support package.

12232.6k10](/packages/kodicomponents-navigation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
