PHPackages                             chaker2710/laravel-telnet - 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. chaker2710/laravel-telnet

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

chaker2710/laravel-telnet
=========================

A client for writing/reading commands to a host over telnet.

v1.0.0(2y ago)0142LGPL-3.0-onlyPHPPHP &gt;=5.3

Since Aug 14Pushed 2y agoCompare

[ Source](https://github.com/chaker2710/laravel-telnet)[ Packagist](https://packagist.org/packages/chaker2710/laravel-telnet)[ RSS](/packages/chaker2710-laravel-telnet/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

TelnetClient.php
================

[](#telnetclientphp)

Update 08.10.2020 - borisuu: I've made this a composer package for easier install into other projects. No code changes made.

Telnet client implementation in PHP.

This code is based on but was completely rewritten. I tried to keep interface compatibility as much as possible.

Things that I know not to work the same anymore:

- Using the constructor with more than 2 arguments, the meaning and order of subsequent parameters have changed
- Line endings should always be returned to the caller as "\\n" but this guarantee is based on the assumption of a correct server implementation (one that encodes line endings as &lt;CR&gt; &lt;LF&gt; in the default (text) state)
- buffer and global\_buffer as well as their associated methods are gone
- The constructor no longer does a connect() call
- The subclassing interface is probably broken (I couldn't keep the getBuffer() method without skipping the state machine)

Many things are still wrong (though it was like that in upstream versions too):

- we DONT/WONT Suppress Go Ahead, Echo and Linemode but expect them to work, etc.

Usage example:
--------------

[](#usage-example)

```
use Borisuu\Telnet\TelnetClient;

//Uncomment this to get debug logging
//TelnetClient::setDebug(true);

$telnet = new TelnetClient('127.0.0.1', 23);
$telnet->connect();
$telnet->setPrompt('$'); //setRegexPrompt() to use a regex
//$telnet->setPruneCtrlSeq(true); //Enable this to filter out ANSI control/escape sequences
$telnet->login('telnetuser', 'weak');

$cmdResult = $telnet->exec('ls /');

$telnet->disconnect();

print("The contents of / is: \"{$cmdResult}\"\n");
```

Alternatively, have a look at testTelnet.php:

```
$ ./testTelnet.php -h
$ ./testTelnet.php -u telnetuser -p weak -H 127.0.0.1 -P 23 -c "ls /"
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 88.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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1056d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aeeb7d7e5372c79395d4e3acba921eb007be863eae75245f82440ff753e1eb5f?d=identicon)[chaker2710](/maintainers/chaker2710)

---

Top Contributors

[![diotteo](https://avatars.githubusercontent.com/u/5789496?v=4)](https://github.com/diotteo "diotteo (161 commits)")[![ngharo](https://avatars.githubusercontent.com/u/1051454?v=4)](https://github.com/ngharo "ngharo (11 commits)")[![borisuu](https://avatars.githubusercontent.com/u/34666518?v=4)](https://github.com/borisuu "borisuu (6 commits)")[![FrittenKeeZ](https://avatars.githubusercontent.com/u/1186125?v=4)](https://github.com/FrittenKeeZ "FrittenKeeZ (2 commits)")[![AustP](https://avatars.githubusercontent.com/u/2007045?v=4)](https://github.com/AustP "AustP (1 commits)")[![chaker2710](https://avatars.githubusercontent.com/u/46485085?v=4)](https://github.com/chaker2710 "chaker2710 (1 commits)")

### Embed Badge

![Health badge](/badges/chaker2710-laravel-telnet/health.svg)

```
[![Health](https://phpackages.com/badges/chaker2710-laravel-telnet/health.svg)](https://phpackages.com/packages/chaker2710-laravel-telnet)
```

PHPackages © 2026

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