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

ActiveLibrary

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

An easy way to collect free learning ebooks from Packtpub.

v1.2.0(9y ago)421MITPHPPHP &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 2mo 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 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

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

3522d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fcf41bf377df077c60272fea95b86b221e6923caa6f4075a519ac161186534ed?d=identicon)[bradcornford](/maintainers/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

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[shlinkio/shlink

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

4.8k4.3k](/packages/shlinkio-shlink)[spatie/laravel-export

Create a static site bundle from a Laravel app

646127.9k5](/packages/spatie-laravel-export)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)

PHPackages © 2026

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