cornford/packtpublr
Composer 安装命令:
composer require cornford/packtpublr
包简介
An easy way to collect free learning ebooks from Packtpub.
README 文档
README
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
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
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
You can set Packtpublr to run as a scheduled item using a Crontab. Firstly run crontab -e and add the following line:
0 9 * * * <PATH_TO_PHP>/php <PATH_TO_PACKTPUBLR>/index.php 2>&1
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
The login method will login to Packtpublr, with optional parameters for email address and password.
$instance->login();
$instance->login('email@address.com', 'Password');
Redeem
The redeem method will redeem the current free learning item on Packtpublr.
$instance->redeem();
Logout
The logout method will logout of Packtpublr.
$instance->logout();
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
Packtpublr is open-sourced software licensed under the MIT license
cornford/packtpublr 适用场景与选型建议
cornford/packtpublr 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 21 次下载、GitHub Stars 达 4, 最近一次更新时间为 2016 年 09 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「ebook」 「free」 「learning」 「collect」 「packtpub」 「redeem」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cornford/packtpublr 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cornford/packtpublr 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cornford/packtpublr 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Book publishing application
PHP package to create OPDS feed for eBooks.
Reading and writing metadata included in the EPub ebook format
Simple and elegant tools for build web application.
free as in freedom php component requirement
Creating EPUB and PDF ebook from Markdown
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-08