PHPackages                             yakeing/php\_letsencrypt - 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. [Security](/categories/security)
4. /
5. yakeing/php\_letsencrypt

AbandonedArchivedSymfony-bundle[Security](/categories/security)

yakeing/php\_letsencrypt
========================

PHP SSL for letsencrypt.com acme v02

v3.1.1(5y ago)481MPL-2.0PHPPHP &gt;=5.6

Since Oct 9Pushed 5y ago1 watchersCompare

[ Source](https://github.com/yakeing/php_letsencrypt)[ Packagist](https://packagist.org/packages/yakeing/php_letsencrypt)[ Docs](https://github.com/yakeing/php_letsencrypt)[ Fund](https://github.com/yakeing/Documentation/blob/master/Sponsor/README.md)[ RSS](/packages/yakeing-php-letsencrypt/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

[![](https://camo.githubusercontent.com/65a268a534e23beb410867380bbb9ea699be17ef0536004368d2b55c7f3f2981/68747470733a2f2f6c657473656e63727970742e6f72672f696d616765732f6c657473656e63727970742d6c6f676f2d686f72697a6f6e74616c2e737667)](https://camo.githubusercontent.com/65a268a534e23beb410867380bbb9ea699be17ef0536004368d2b55c7f3f2981/68747470733a2f2f6c657473656e63727970742e6f72672f696d616765732f6c657473656e63727970742d6c6f676f2d686f72697a6f6e74616c2e737667)

Letsencrypt
===========

[](#letsencrypt)

PHP SSL for [letsencrypt](https://letsencrypt.org) ACME v2.

Let’s Encrypt is a free, automated, and open certificate authority brought to you by the non-profit [Internet Security Research Group (ISRG)](https://www.abetterinternet.org).

`Only PHP client is provided here.`

Supporting RSA ECC

### Travis CI badge

[](#travis-ci-badge)

[![Travis-ci](https://camo.githubusercontent.com/3c7fa212d3b96671493d7f67465f914f40e74f8a2d2424089ebc0987d7c32783/68747470733a2f2f6170692e7472617669732d63692e636f6d2f79616b65696e672f7068705f6c657473656e63727970742e7376673f6272616e63683d6d61696e)](https://travis-ci.com/yakeing/php_letsencrypt)

### codecov badge

[](#codecov-badge)

[![codecov](https://camo.githubusercontent.com/c29d8811ff4b46dc9a954984ca75e7925bb99ec9ee0c27690c03910321803496/68747470733a2f2f636f6465636f762e696f2f67682f79616b65696e672f7068705f6c657473656e63727970742f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/yakeing/php_letsencrypt)

### Packagist badge

[](#packagist-badge)

[![Version](https://camo.githubusercontent.com/c1c957700fb98a55f770b8c7e8588dfe7bbf9e2bbdd5940ff84d6f9c33d34ce6/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f79616b65696e672f7068705f6c657473656e63727970742e737667)](../../releases)[![Downloads](https://camo.githubusercontent.com/f43d14b6059985a0268720d4f5a30f9b09d5ac37224d1ce1f6e7d9581145ee15/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f79616b65696e672f7068705f6c657473656e63727970742e737667)](https://packagist.org/packages/yakeing/php_letsencrypt/stats)

### Github badge

[](#github-badge)

[![Downloads](https://camo.githubusercontent.com/638e47cabde3223c3d0303ec5d45a11cd093cdcb45473a49404c119fce0e2ac6/68747470733a2f2f342e76657263656c2e6170702f6769746875622f646f776e6c6f6164732f79616b65696e672f7068705f6c657473656e63727970743f69636f6e3d676974687562)](../../)[![Size](https://camo.githubusercontent.com/60c5ce82eefdbf32fa417c435cf973385fa2c11c7e0c60fa3e441aab358f7cec/68747470733a2f2f342e76657263656c2e6170702f6769746875622f73697a652f79616b65696e672f7068705f6c657473656e63727970743f69636f6e3d676974687562)](src)[![tag](https://camo.githubusercontent.com/d018ea5d999e4778b4a97da56bf7d833e45e803e7e52af745ff366aff37a5b55/68747470733a2f2f342e76657263656c2e6170702f6769746875622f7461672f79616b65696e672f7068705f6c657473656e63727970743f69636f6e3d676974687562)](../../releases)[![license](https://camo.githubusercontent.com/904c4bcc21898764c7b6b7edfba26ea0d5427757cfaee2837ee7bed32124b40b/68747470733a2f2f342e76657263656c2e6170702f7374617469632f6c6963656e73652f3535352f4d504c2d322e302f6665376433373f69636f6e3d676974687562)](LICENSE)[![languages](https://camo.githubusercontent.com/5275888fd9cd7a7b85d47b803d247819aa953b27342dfa420173152309ab1a18/68747470733a2f2f342e76657263656c2e6170702f7374617469632f6c616e67756167652f3535352f5048502f3334616265663f69636f6e3d676974687562)](../../search?l=php)

### Installation

[](#installation)

Use [Composer](https://getcomposer.org) to install the library. Of course, You can go to [Packagist](https://packagist.org/packages/yakeing/php_letsencrypt) to view.

```
    $ composer require yakeing/php_letsencrypt

```

### Initialization parameter

[](#initialization-parameter)

- Sample：

```
    $le = new letsencrypt();
    $option = array();
    $option['accountKey'] = '-----BEGIN PUBLIC KEY-----\nMIIBIjA....NjQIDAQA\n-----END PUBLIC KEY----';
```

### Get Directory

[](#get-directory)

- Sample：

```
    echo $le->Directory();
```

### New Nonce

[](#new-nonce)

- Sample：

```
    echo $le->NewNonce();
```

### New User Registration

[](#new-user-registration)

- Sample：

```
    //-----BEGIN PUBLIC KEY-----\nMIIBIjA....NjQIDAQA\n-----END PUBLIC KEY----
    $accountKey = $option['accountKey'];
    $userinfo = array('mailto:yakeing@github.com');

    $le->NewAccount($accountKey, $userinfo);
    $option['kid'] = $le->body['kid'];
```

### New Order

[](#new-order)

- Sample：

```
    //-----BEGIN PUBLIC KEY-----\nMIIBIjA....NjQIDAQA\n-----END PUBLIC KEY----
    $accountKey = $option['accountKey'];
    $domain = 'example.com';
    $kid = $option['kid']; //12345
    $type = 'dns';

    $le->NewOrder($accountKey, $domain, $kid, $type);
    $option['authorizations'] = $le->body['authorizations'][0];
    $option['finalize'] = $le->body['finalize'];
```

### Get challenges

[](#get-challenges)

- Sample：

```
    $jsonAuthz = file_get_contents($option['authorizations']); //array(.....)
    $authz = json_decode($jsonAuthz, true);
    foreach ($authz['challenges'] as $value) {
      if ('http-01' == $value['type']) {
        //$option['status'] = $value['status']; // valid
        $option['url'] = $value['url'];
        $option['token'] = $value['token'];
      }
    }
```

### Get Dns Txt

[](#get-dns-txt)

- Sample：

```
    //-----BEGIN PUBLIC KEY-----\nMIIBIjA....NjQIDAQA\n-----END PUBLIC KEY----
    $accountKey = $option['accountKey'];
    $token = $option['token']; //gDhhgh5Sdgf......fGDB0ceWadfg

    $ret = $le->GetDnsTxt($accountKey, $token);
    // FrZWluZ0BnaXR......odWIuY29tMFkwE
```

### Challenge

[](#challenge)

- Sample：

```
    //-----BEGIN PUBLIC KEY-----\nMIIBIjA....NjQIDAQA\n-----END PUBLIC KEY----
    $accountKey = $option['accountKey'];
    $kid = $option['kid']; //12345
    $url = $option['url']; //https://~.api.letsencrypt.org/acme/authz-v3/*****
    $token = $option['token']; //gDhhgh5Sdgf......fGDB0ceWadfg
    $le->Challenge($accountKey, $kid, $url, $token);
    //$le->body['status'] == 'valid'
```

### Application for certificate issuance

[](#application-for-certificate-issuance)

- Sample：

```
    //-----BEGIN PUBLIC KEY-----\nMIIBIjA....NjQIDAQA\n-----END PUBLIC KEY----
    $accountKey = $option['accountKey'];
    $kid = $option['kid']; //12345
    $finalizeUrl = $option['finalize']; //https://~.api.letsencrypt.org/acme/finalize/***/***';
    $csr = '-----BEGIN CERTIFICATE-----\nMIIEjjCCA3agAw....NjDNFu0Qg==-----END CERTIFICATE-----';
    $outCert = true;

    $le->GetCert($accountKey, $kid, $finalizeUrl, $csr, $outCert);
    $Cert = $le->body; //certificate
```

### Certificate revocation

[](#certificate-revocation)

- Sample：

```
    $cerKey = '-----BEGIN PUBLIC KEY-----\nMIIBIjA....NjQIDAQA\n-----END PUBLIC KEY----';
    $Cert = '-----BEGIN CERTIFICATE-----\nMIIEA2agAw....HgdYhhE9gj\n==-----END CERTIFICATE-----';
    $reason = 0;

    $le->RevokeCert($cerKey, $cer, $reason);
```

### Domain name deauthorization

[](#domain-name-deauthorization)

- Sample：

```
    //-----BEGIN PUBLIC KEY-----\nMIIBIjA....NjQIDAQA\n-----END PUBLIC KEY----
    $accountKey = $option['accountKey'];
    $kid = 'k6789';
    $authKid = 'd12345';

    $le->AuthzDeactivate($accountKey, $kid, $authKid);
```

### Change account communication key

[](#change-account-communication-key)

- Sample：

```
    //-----BEGIN PUBLIC KEY-----\nMIIBIjA....NjQIDAQA\n-----END PUBLIC KEY----
    $accountKey = $option['accountKey'];
    $kid = $option['kid']; //12345
    $newAccountKey = '-----BEGIN PUBLIC KEY-----\nOIYGRjp8....ATy3ggQiyA\n-----END PUBLIC KEY----';;

    $le->KeyChange($accountKey, $kid, $newAccountKey);
```

### Account deactivation

[](#account-deactivation)

- Sample：

```
    //-----BEGIN PUBLIC KEY-----\nMIIBIjA....NjQIDAQA\n-----END PUBLIC KEY----
    $accountKey = $option['accountKey'];
    $kid = $option['kid']; //12345

    $le->DeactivatedAccount($accountKey, $kid);
```

[Sponsor](https://github.com/yakeing/Documentation/blob/master/Sponsor/README.md)
---------------------------------------------------------------------------------

[](#sponsor)

If you've got value from any of the content which I have created, then I would very much appreciate your support by payment donate.

[![Sponsor](https://camo.githubusercontent.com/8bf9004e5f53d2223ce47ceeed603c32154d9e6afa76039dd117bf91c5c1a685/68747470733a2f2f342e76657263656c2e6170702f7374617469632f53706f6e736f722f4541344141413f69636f6e3d6865617274)](https://github.com/yakeing/Documentation/blob/master/Sponsor/README.md)

Author
------

[](#author)

weibo: [yakeing](https://weibo.com/yakeing)

twitter: [yakeing](https://twitter.com/yakeing)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~340 days

Total

2

Last Release

2069d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95aaf19e492f95c5180360b25e7197ff554625372973f3555b9792a07d5cb9f2?d=identicon)[yakeing](/maintainers/yakeing)

---

Top Contributors

[![yakeing](https://avatars.githubusercontent.com/u/6356091?v=4)](https://github.com/yakeing "yakeing (10 commits)")

---

Tags

phpdnsletsencryptACMEcer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yakeing-php-letsencrypt/health.svg)

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

###  Alternatives

[kelunik/acme

ACME library written in PHP.

121603.9k3](/packages/kelunik-acme)[analogic/lescript

Lescript is simplified concept of ACME client implementation especially for Let's encrypt service. It's goal is to have one easy to use PHP file without dependencies.

22614.6k1](/packages/analogic-lescript)[kelunik/acme-client

Let's Encrypt / ACME client written in PHP for the CLI.

3933.9k1](/packages/kelunik-acme-client)[stymiee/php-simple-encryption

The PHP Simple Encryption library is designed to simplify the process of encrypting and decrypting data while ensuring best practices are followed. By default is uses a secure encryption algorithm and generates a cryptologically strong initialization vector so developers do not need to becomes experts in encryption to securely store sensitive data.

448.0k](/packages/stymiee-php-simple-encryption)[ukrbublik/openssl_x509_crl

Missing OpenSSL function on PHP to create CRL (certificate revocation list) for CA

182.1k](/packages/ukrbublik-openssl-x509-crl)

PHPackages © 2026

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