PHPackages                             fennb/phirehose - 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. [API Development](/categories/api)
4. /
5. fennb/phirehose

ActiveLibrary[API Development](/categories/api)

fennb/phirehose
===============

A PHP interface to the Twitter Streaming API.

v1.0.3(4y ago)698402.4k—5.8%186[2 issues](https://github.com/fennb/phirehose/issues)[3 PRs](https://github.com/fennb/phirehose/pulls)GPLPHPPHP &gt;=5.2.0

Since Dec 18Pushed 4y ago45 watchersCompare

[ Source](https://github.com/fennb/phirehose)[ Packagist](https://packagist.org/packages/fennb/phirehose)[ Docs](https://github.com/fennb/phirehose)[ RSS](/packages/fennb-phirehose/feed)WikiDiscussions master Synced today

READMEChangelog (4)DependenciesVersions (7)Used By (0)

Phirehose
=========

[](#phirehose)

A PHP interface to the Twitter Streaming API (firehose, etc). This library makes it easy to connect to and consume the Twitter stream via the Streaming API.

See:

-  and
-

Goals
-----

[](#goals)

- Provide a simple interface to the Twitter Streaming API for PHP applications
- Comply to Streaming API recommendations for error handling, reconnection, etc
- Encourage well-behaved streaming API clients
- Operate independently of PHP extensions (ie: shared memory, PCNTL, etc)

### This library does:

[](#this-library-does)

- Handles connection/authentication to the twitter streaming API
- Consumes the stream handing off each status to be enqueued by a method of your choice
- Handles graceful reconnection/back-off on connection and API errors
- Monitors/reports performance metrics and errors

### This library does NOT:

[](#this-library-does-not)

- Decode/process tweets
- Provide any sort of queueing mechanism for asynchronous processing (though some examples are included)
- Provide any sort of inter-process communication
- Provide any non-streaming API functionality (ie: user profile info, search, etc)

How To Use
----------

[](#how-to-use)

See the example subdirectory for example usage. In each example file you will need to insert your own oauth token/secret, and the key/secret for the Twitter app you have created.

- filter-oauth.php shows how to follow certain keywords.
- sample.php shows how to get a small random sample of all public statuses.
- userstream-alternative.php shows how to get user streams. (All activity for one user.)
- sitestream.php shows to how to get site streams. (All activity for multiple users.)

Please see the wiki for [documentation](https://github.com/fennb/phirehose/wiki/Introduction).

Known Issues
------------

[](#known-issues)

- After upgrading to PHP 5.6.8, Phirehose causes CPU spikes. To fix, upgrade to PHP 5.6.9 ([\#83](https://github.com/fennb/phirehose/issues/83)).

Support
-------

[](#support)

If you have any additional questions, head over to the Phirehose Users group \[\]. It's recommended that you join (or at least regularly check) this group if you're actively using Phirehose so I can let you know when I release new versions.

Additionally, if you'd like to contact me directly, I'm [@fennb](http://twitter.com/fennb) on twitter.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity58

Moderate usage in the ecosystem

Community33

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~667 days

Total

5

Last Release

1779d ago

Major Versions

v0.1 → v1.0.02014-01-16

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/138688?v=4)[Jonathon Hill](/maintainers/compwright)[@compwright](https://github.com/compwright)

---

Top Contributors

[![DarrenCook](https://avatars.githubusercontent.com/u/880436?v=4)](https://github.com/DarrenCook "DarrenCook (28 commits)")[![fennb](https://avatars.githubusercontent.com/u/127930?v=4)](https://github.com/fennb "fennb (27 commits)")[![sebastianhoitz](https://avatars.githubusercontent.com/u/353768?v=4)](https://github.com/sebastianhoitz "sebastianhoitz (6 commits)")[![sankar4n](https://avatars.githubusercontent.com/u/501259?v=4)](https://github.com/sankar4n "sankar4n (4 commits)")[![ahmedofali](https://avatars.githubusercontent.com/u/22732463?v=4)](https://github.com/ahmedofali "ahmedofali (4 commits)")[![compwright](https://avatars.githubusercontent.com/u/138688?v=4)](https://github.com/compwright "compwright (4 commits)")[![tonybyng](https://avatars.githubusercontent.com/u/9347905?v=4)](https://github.com/tonybyng "tonybyng (3 commits)")[![aaronpk](https://avatars.githubusercontent.com/u/113001?v=4)](https://github.com/aaronpk "aaronpk (2 commits)")[![MichelCarroll](https://avatars.githubusercontent.com/u/222127?v=4)](https://github.com/MichelCarroll "MichelCarroll (1 commits)")[![mkraemer](https://avatars.githubusercontent.com/u/1070200?v=4)](https://github.com/mkraemer "mkraemer (1 commits)")[![Parad0X](https://avatars.githubusercontent.com/u/14222?v=4)](https://github.com/Parad0X "Parad0X (1 commits)")[![samedyildirim](https://avatars.githubusercontent.com/u/6238444?v=4)](https://github.com/samedyildirim "samedyildirim (1 commits)")[![thaddeusmt](https://avatars.githubusercontent.com/u/129787?v=4)](https://github.com/thaddeusmt "thaddeusmt (1 commits)")[![vitch](https://avatars.githubusercontent.com/u/9898?v=4)](https://github.com/vitch "vitch (1 commits)")[![aizatto](https://avatars.githubusercontent.com/u/1182?v=4)](https://github.com/aizatto "aizatto (1 commits)")[![bangpound](https://avatars.githubusercontent.com/u/6731?v=4)](https://github.com/bangpound "bangpound (1 commits)")[![calvinnwq](https://avatars.githubusercontent.com/u/580008?v=4)](https://github.com/calvinnwq "calvinnwq (1 commits)")[![Darkflib](https://avatars.githubusercontent.com/u/101405?v=4)](https://github.com/Darkflib "Darkflib (1 commits)")[![exelotl](https://avatars.githubusercontent.com/u/569607?v=4)](https://github.com/exelotl "exelotl (1 commits)")[![kinow](https://avatars.githubusercontent.com/u/304786?v=4)](https://github.com/kinow "kinow (1 commits)")

---

Tags

phpapistreamingtwitterphirehose

### Embed Badge

![Health badge](/badges/fennb-phirehose/health.svg)

```
[![Health](https://phpackages.com/badges/fennb-phirehose/health.svg)](https://phpackages.com/packages/fennb-phirehose)
```

###  Alternatives

[redwebcreation/twitter-stream-api

Consume the Twitter Stream API in real-time.

3220.1k](/packages/redwebcreation-twitter-stream-api)[noweh/twitter-api-v2-php

This library provides methods for sending messages to Twitter and receiving statuses.

129213.0k1](/packages/noweh-twitter-api-v2-php)[owlycode/streaming-bird

A PHP client for the Twitter Streaming APIs inspired from Phirehose.

1024.6k](/packages/owlycode-streaming-bird)

PHPackages © 2026

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