PHPackages                             jianjye/php-cfstream - 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. jianjye/php-cfstream

AbandonedLibrary

jianjye/php-cfstream
====================

Upload and manage Cloudflare Stream easily

91.3k8PHP

Since Apr 6Pushed 7y ago2 watchersCompare

[ Source](https://github.com/jianjye/php-cfstream)[ Packagist](https://packagist.org/packages/jianjye/php-cfstream)[ RSS](/packages/jianjye-php-cfstream/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP - Cloudflare Stream
=======================

[](#php---cloudflare-stream)

PHP CFStream is a PHP TUS client that makes it easy to send video files to Cloudflare Stream.

- Simple interface that supports:
    - Upload videos
    - Get status of uploaded videos
    - Get embed code for videos
    - Set allowedOrigins for each video
    - Delete videos
- Implemented in pure PHP and CURL with the help of GuzzleHttp Client
- Tightly integrated with Cloudflare Stream
- Does not support:
    - Resume uploads

Installation
------------

[](#installation)

Install the package via Composer as usual. Use the `dev-master` branch.

```
composer require jianjye/php-cfstream dev-master

```

#### Laravel 5.0+

[](#laravel-50)

For Laravel 5.0 and newer projects, you can do `vendor:publish` to enable basic integrations:

```
php artisan vendor:publish

```

Then select `Provider: JianJye\CFStream\Laravel\ServiceProvider`. `cfstream.php` will be copied to your `config` folder.

After that, add these into your `.env` file:

```
CLOUDFLARE_KEY=
CLOUDFLARE_ZONE=
CLOUDFLARE_EMAIL=

```

Usage
-----

[](#usage)

#### Generic PHP Projects

[](#generic-php-projects)

If you are on composer-enabled projects, the following instructions should work for you. Otherwise try requiring `src/CFStream.php` directly in your project instead.

```
use JianJye\CFStream\CFStream;

$cfstream = new CFStream($key, $zone, $email);

$resourceUrl = $cfstream->upload($filepath);
$cfstream->status($resourceUrl);
$cfstream->code($resourceUrl);
$cfstream->allow($resourceUrl, 'example.com, *.example.net');
$cfstream->delete($resourceUrl);

```

#### Laravel Projects

[](#laravel-projects)

If you have done the `vendor:publish` step, then `CFStream` can grab your credentials from the config file. You can use the `CFStreamLaravel` client instead.

```
use JianJye\CFStream\CFStreamLaravel;

$cfstream = new CFStreamLaravel();

$resourceUrl = $cfstream->upload($filepath);
$cfstream->status($resourceUrl);
$cfstream->code($resourceUrl);
$cfstream->allow($resourceUrl, 'example.com, *.example.net');
$cfstream->delete($resourceUrl);

```

Changelog
---------

[](#changelog)

### 2019-04-02 - Namespace Changed

[](#2019-04-02---namespace-changed)

The namespace of this project has been updated from `JJSee` to `JianJye`. Please update your projects accordingly.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 87.5% 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://avatars.githubusercontent.com/u/400056?v=4)[Jian Jye](/maintainers/jianjye)[@jianjye](https://github.com/jianjye)

---

Top Contributors

[![jianjye](https://avatars.githubusercontent.com/u/400056?v=4)](https://github.com/jianjye "jianjye (7 commits)")[![jjsee](https://avatars.githubusercontent.com/u/90805479?v=4)](https://github.com/jjsee "jjsee (1 commits)")

### Embed Badge

![Health badge](/badges/jianjye-php-cfstream/health.svg)

```
[![Health](https://phpackages.com/badges/jianjye-php-cfstream/health.svg)](https://phpackages.com/packages/jianjye-php-cfstream)
```

PHPackages © 2026

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