PHPackages                             seekquarry/atto - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. seekquarry/atto

ActiveLibrary[HTTP &amp; Networking](/categories/http)

seekquarry/atto
===============

Single-file, pure-PHP servers and routing engines: HTTP/1.1+2, gopher, SMTP/IMAP, DNS, FTP, SSH/SFTP, STUN/TURN.

v2.2.2(2w ago)20211GPL-3.0-or-laterPHPPHP &gt;=8.1.0

Since Jun 4Pushed 1w ago1 watchersCompare

[ Source](https://github.com/cpollett/atto)[ Packagist](https://packagist.org/packages/seekquarry/atto)[ Docs](https://www.seekquarry.com/)[ RSS](/packages/seekquarry-atto/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (21)Used By (0)

Atto is a collection of single-file, low-dependency, pure-PHP servers and routing engines. Each server is one file you drop into a project, configure with a few chained setters, and start with a `listen()` call. No Composer modules required. No build step.

What's in the box:

- **WebSite** -- HTTP/1.1, HTTP/2, and HTTP/3 web server and router. Doubles as a micro-framework under Apache, nginx, or lighttpd, or runs standalone. All protocols are pure PHP implementations, the largest, HTTP/3 is in an optional side file as its performance mainly just matches HTTP/2 in our benchmarking. A sibling H3QuicheListener wraps libquiche through PHP-FFI for side-by-side comparison. In our testing, this is slower than the pure implementation because of the FFI overhead.
- **GopherSite** -- a [gopher protocol](https://en.wikipedia.org/wiki/Gopher_%28protocol%29) server, shaped just like WebSite.
- **MailSite** -- SMTP and IMAP in one process. STARTTLS, authenticated submission, mailbox storage, the lot.
- **DnsSite** -- authoritative DNS server. Reads zone files, answers UDP and TCP queries, supports DoT (DNS over TLS).
- **FtpSite** -- FTP server with explicit and implicit FTPS. Speaks the command set FileZilla and curl expect, including MLSD listings, passive and active data connections, and a path-traversal guard.
- **SshSite** -- SSH-2 server (RFC 4250-4254) with the SFTP subsystem. Curve25519 KEX, Ed25519 host keys, AES-128-CTR + HMAC-SHA-256. Password and publickey auth (OpenSSH-format authorized\_keys). All crypto comes from PHP's bundled ext-sodium / ext-openssl / ext-hash.
- **TurnSite** -- STUN/TURN server (RFC 8489 / RFC 8656) for WebRTC and SIP relays. Long-term credentials, allocations, channels.

A few things every Atto server has in common: request-event-driven (one PHP process, async I/O); the `$site->get('/', ...)` routing API carries through where it makes sense; familiar superglobals like `$_GET`, `$_POST`, `$_SESSION`, `$_FILES` are populated for the protocols where that idiom fits. Sessions live in RAM, timers fire on a schedule, and file I/O goes through caching `fileGetContents` / `filePutContents` helpers.

Hello, World
------------

[](#hello-world)

```
