Download the PHP package czkj/eleme without Composer

On this page you can find all versions of the php package czkj/eleme. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package eleme

饿了么领红包PHP-SDK

基于mtdhb/get开源代码的PHP简单封装。

感谢zhuweiyou的无私贡献。

该项目主要是练习composer的使用,不详尽之处欢迎补充。

环境

PHP >= 5.6

composer

使用方法

详细用法可参考https://github.com/mtdhb/get 源码


$url = ''; // 饿了么红包地址
$cookie = ''; // cookie
$phone = ''; // 手机号

$tools = new Tools();
// 1、链接解析
$data = $tools->getUrlQueryData($url);

// 2、绑定手机号
// 已绑定过的cookie可以跳过此步骤;除非你打算每次都用一个新的手机号
$request = new Request($data['sn'],$cookie);
$res = $request->sendMobileCode($phone);
dump($request->errMsg);
dump($res);exit; // 此处需要使用异步进行

$your_cookie_param = $request->cookieBindPhone($phone,'632833','14414f1d3b9558799b4818ca7c4335121d971988a60e2ffc96f0ada92dd77cb1');
dump($request->errMsg);
dump($res);

// 3、领取红包
$res = $request->getRedPacket($phone,$data['platform'],'632833','14414f1d3b9558799b4818ca7c4335121d971988a60e2ffc96f0ada92dd77cb1');
// 如果你要使用已绑定过的cookie,应该这样传值
// $res = $request->getRedPacket($phone,$data['platform'],'','','qq',$your_cookie_param);
dump($request->errMsg);
dump($res);exit;

getRedPacket返回值

{
    "account": "185****9730", // 领取的手机
    "is_lucky": false, // 是否是最佳手气
    "promotion_items": [ // 红包列表
        {
            "amount": 3,
            "expire_date": "2018-08-30",
            "hongbao_variety": [
                "全品类"
            ],
            "is_new_user": false,
            "item_type": 1,
            "name": "品质联盟专享红包",
            "phone": "18587399730",
            "source": "weixin_share_hongbao",
            "sum_condition": 25,
            "validity_periods": "2018-08-30到期"
        }
        // 此处省略其他红包
    ],
    "promotion_records": [ // 被领取了多少个了
       {
            "amount": 3,
            "created_at": 1535549289,
            "is_doubling_issued": false,
            "is_lucky": false,
            "sns_avatar": "",
            "sns_username": "185****9730"
       }
    ],
    "ret_code": 4,  // 领取成功
    "theme_id": 2953
}
// ret_code = 2 已经领过了
// ret_code = 1 红包已领完
// ret_code = 5 没有次数了
// ret_code = 3 领取成功

All versions of eleme with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package czkj/eleme contains the following files

Loading the files please wait ....