2017 © Pedro Peláez
 

library thailandpost-track

Simple library for Thailandpost track ems

image

kittinan/thailandpost-track

Simple library for Thailandpost track ems

  • Friday, July 13, 2018
  • by kittinan
  • Repository
  • 2 Watchers
  • 15 Stars
  • 76 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

#f03c15 Not working (2019-09-20) #f03c15

Thailand POST change their web page and open the API https://track.thailandpost.co.th/developerGuide, (*1)

Issue #3, (*2)

thailandpost-track

Build Status License Latest Stable Version, (*3)

Simple library for thailandpost track EMS with Chrome headless, (*4)

Requirement

  • PHP 7.0+
  • mbstring extension
  • Chrome binary

Composer

Install the latest version with composer, (*5)

composer require kittinan/thailandpost-track

This library on the Packagist., (*6)

https://packagist.org/packages/kittinan/thailandpost-track, (*7)

Install Chrome

Install chromium-browser or Google Chrome, (*8)

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., (*9)

//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), (*10)

The Versions

13/07 2018

dev-master

9999999-dev

Simple library for Thailandpost track ems

  Sources   Download

MIT

The Requires

 

The Development Requires

15/10 2015

1.0.1

1.0.1.0

Simple library for Thailandpost track ems

  Sources   Download

MIT

The Requires

 

The Development Requires

23/04 2015

1.0.0

1.0.0.0

Simple library for Thailandpost track ems

  Sources   Download

MIT

The Requires

 

The Development Requires