kittinan/thailandpost-track 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kittinan/thailandpost-track

最新稳定版本:2.0.0

Composer 安装命令:

composer require kittinan/thailandpost-track

包简介

Simple library for Thailandpost track ems with chrome headless

README 文档

README

Thailand POST change their web page and open the API https://track.thailandpost.co.th/developerGuide

Issue #3

thailandpost-track

Build Status License Latest Stable Version

Simple library for thailandpost track EMS with Chrome headless

Requirement

  • PHP 7.0+
  • mbstring extension
  • Chrome binary

Composer

Install the latest version with composer

composer require kittinan/thailandpost-track

This library on the Packagist.

https://packagist.org/packages/kittinan/thailandpost-track

Install Chrome

Install chromium-browser or Google Chrome

Ubuntu/Debian

sudo apt-get install chromium-browser

Usage

//Do not forget to define Google Chrome or Chromium binary path

$chrome_bin = '/usr/bin/chromium-browser';
$track = new \KS\THAILANDPOST\Track($chrome_bin);
$ems = 'EN123456789TH';
$trackers = $track->getTracks($ems);

//Result return false or array of track status
Array
(
    [0] => Array
        (
            [date] => April 17, 2015  10:42:25
            [location] => PAK CHONG
            [description] => Accept
            [status] => 
        )

    [1] => Array
        (
            [date] => April 17, 2015  13:42:39
            [location] => PAK CHONG
            [description] => Items Into Container
            [status] => 
        )
)

You can enable English language.

//Do not forget to define Google Chrome or Chromium binary path

$chrome_bin = '/usr/bin/chromium-browser';
$track = new \KS\THAILANDPOST\Track($chrome_bin);

//For Thai language (default)
$track->enableThaiLanguage

//For English language
$track->enableEngLanguage();

$ems = 'EN123456789TH';
$trackers = $track->getTracks($ems);

License

The MIT License (MIT)

统计信息

  • 总下载量: 507
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 19
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 3
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-23