PHPackages                             cornford/packtpublr - 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. cornford/packtpublr

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

cornford/packtpublr
===================

An easy way to collect free learning ebooks from Packtpub.

v1.2.0(9y ago)521MITPHPPHP &gt;=5.5.0

Since Sep 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bradcornford/Packtpublr)[ Packagist](https://packagist.org/packages/cornford/packtpublr)[ RSS](/packages/cornford-packtpublr/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

An easy way to redeem free learning e-books from Packtpublr
===========================================================

[](#an-easy-way-to-redeem-free-learning-e-books-from-packtpublr)

[![Latest Stable Version](https://camo.githubusercontent.com/2c09b28850b5f08d7f70d9f9567acf57f40e294f5098b3949f684906d0cf8d13/68747470733a2f2f706f7365722e707567782e6f72672f636f726e666f72642f5061636b747075626c722f76657273696f6e2e706e67)](https://packagist.org/packages/cornford/packtpublr)[![Total Downloads](https://camo.githubusercontent.com/9a479023692a34122735fa31db7f9895525beae6cc53bcd4d8fa658dd96c8286/68747470733a2f2f706f7365722e707567782e6f72672f636f726e666f72642f7061636b747075626c722f642f746f74616c2e706e67)](https://packagist.org/packages/cornford/packtpublr)[![Build Status](https://camo.githubusercontent.com/8e81d1b08202d4707711614f4fb6fd55160617c35e5bf0ff03a3a7e3a0b8f25f/68747470733a2f2f7472617669732d63692e6f72672f62726164636f726e666f72642f5061636b747075626c722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bradcornford/Packtpublr)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/995e05c3c03174e361f84ebd2009d5d2db21784e75dde7c01b2363623ebc3d04/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62726164636f726e666f72642f5061636b747075626c722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bradcornford/Packtpublr/?branch=master)

Think of packtpublr as an easy way to redeem free learning e-books from Packtpublr, providing a variety of helpers to speed up the utilisation. These include:

- `$instance->login`
- `$instance->redeem`
- `$instance->logout`
- `$instance->run`
- `$instance->getHttpClient`
- `$instance->setHttpClient`
- `$instance->getCookieSubscriber`
- `$instance->setCookieSubscriber`
- `$instance->getResponseBody`
- `$instance->getResponseCode`
- `$instance->getResponseHeaders`

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

[](#installation)

Begin by installing this package through Composer. Edit your project's `composer.json` file to require `cornford/packtpublr`.

```
"require": {
	"cornford/packtpublr": "2.*"
}

```

Finally, update Composer from the Terminal:

```
composer update

```

That's it! You're all set to go.

Configuration
-------------

[](#configuration)

You can now configure Packtpublr in a few simple steps. Open `src/config/config.example.php` and save it as `src/config/config.php` and update the options as needed.

- `email` - Packtpub email address.
- `password` - Packtpub password.

Schedule
--------

[](#schedule)

You can set Packtpublr to run as a scheduled item using a Crontab. Firstly run `crontab -e` and add the following line:

`0 9 * * * /php /index.php 2>&1`

Usage
-----

[](#usage)

It's really as simple as using the Packtpublr class in any Controller / Model / File you see fit with:

`$instance = new Packtpublr(['email' => 'email@address.com', 'password' => 'Password'])`

This will give you access to

- [Login](#login)
- [Redeem](#redeem)
- [Logout](#logout)
- [Run](#run)

### Login

[](#login)

The `login` method will login to Packtpublr, with optional parameters for email address and password.

```
$instance->login();
$instance->login('email@address.com', 'Password');

```

### Redeem

[](#redeem)

The `redeem` method will redeem the current free learning item on Packtpublr.

```
$instance->redeem();

```

### Logout

[](#logout)

The `logout` method will logout of Packtpublr.

```
$instance->logout();

```

### Run

[](#run)

The `run` method will run a request cycle of login, reddem and logout, with optional parameters for running in console, email address and password.

```
$instance->logout();
$instance->logout(false, 'email@address.com', 'Password');

```

### License

[](#license)

Packtpublr is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity61

Established project with proven stability

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 ~6 days

Total

3

Last Release

3569d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2913887?v=4)[Bradley Cornford](/maintainers/bradcornford)[@bradcornford](https://github.com/bradcornford)

---

Tags

freeebookcollectlearningredeempacktpub

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cornford-packtpublr/health.svg)

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

###  Alternatives

[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

5.1k4.9k](/packages/shlinkio-shlink)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[eliashaeussler/typo3-solver

Solver - Extends TYPO3's exception handling with AI generated solutions. Problems can also be solved from command line. Several OpenAI parameters are configurable and prompts and solution providers can be customized as desired.

302.1k](/packages/eliashaeussler-typo3-solver)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)

PHPackages © 2026

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