2017 © Pedro Peláez
 

library epg-ncplus

EPG parser of ncplus.pl

image

kubrey/epg-ncplus

EPG parser of ncplus.pl

  • Monday, June 13, 2016
  • by kubrey
  • Repository
  • 1 Watchers
  • 0 Stars
  • 50 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 6 % Grown

The README.md

EPG parser for ncplus.pl

Usage

require_once('vendor/autoload.php');

use ncplus/EpgParser;

$parser = new EpgParser();
// to get all channels programs for day
$data = $parser->loadDay(date('Y-m-d');
if($data){
    $programs = $parser->parseCommonData($data);
}

$programs is an array with 2 keys: channels and programs, (*1)

$programs['channels'] is an array where keys are channel's id and value is channel's name, (*2)

$programs['programs'] is multidimensional array of programs for each channel, (*3)

E.g.:, (*4)

[961]=>
    array(10) {
      [0]=>
      array(6) {
        ["id"]=>
        int(22084262)
        ["name"]=>
        string(6) "Tuvalu"
        ["airDate"]=>
        string(10) "2016-05-05"
        ["airTime"]=>
        string(8) "08:25:00"
        ["airLength"]=>
        int(5400)
        ["idChannel"]=>
        int(961)
      }
      [1]=>
      array(6) {
        ["id"]=>
        int(22084263)
        ["name"]=>
        string(6) "Idiota"
        ["airDate"]=>
        string(10) "2016-05-05"
        ["airTime"]=>
        string(8) "09:55:00"
        ["airLength"]=>
        int(10200)
        ["idChannel"]=>
        int(961)
      }
      ...

In this example 961 is channel id, (*5)

To get information on program:, (*6)

$program = $parser->getProgramInfo($id);//$id - program's id from $programs['programs']
if($program){
    $parsed = $parser->parseProgramData($program);
}

This should return something like this, (*7)

array(6) {
  ["descr"]=>
  string(269) "Anton marzy, by uciec na wyspę zwaną Tuvalu. Wszystko wskazuje jednak na to, że jego marzenie raczej się nie spełni biorąc pod uwagę, że Anton pracuje jako konserwator mało popularnego basenu należącego do jego niewidomego ojca. Bohater za wszelką cenę ..."
  ["urlNcpluspl"]=>
  string(45) "2710953-tuvalu-filmbox-arthouse-20160505-0725"
  ["category"]=>
  NULL
  ["country"]=>
  string(6) "Niemcy"
  ["movieCast"]=>
  string(98) "Denis Lavant, Chulpan Khamatova, Philippe Clay, Terrence Gillespie, Catalina Murgea, E.J. Callahan"
  ["movieDirector"]=>
  string(11) "Veit Helmer"
}

The Versions

13/06 2016

dev-master

9999999-dev

EPG parser of ncplus.pl

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar kubrey

parser movies epg ncplus

13/06 2016

0.2.5

0.2.5.0

EPG parser of ncplus.pl

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar kubrey

parser movies epg ncplus

08/06 2016

0.2.4

0.2.4.0

EPG parser of ncplus.pl

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar kubrey

parser movies epg ncplus

08/06 2016

0.2.3

0.2.3.0

EPG parser of ncplus.pl

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar kubrey

parser movies epg ncplus

07/06 2016

0.2.2

0.2.2.0

EPG parser of ncplus.pl

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar kubrey

parser movies epg ncplus

07/06 2016

0.2.1

0.2.1.0

EPG parser of ncplus.pl

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar kubrey

parser movies epg ncplus

06/05 2016

0.2.0

0.2.0.0

EPG parser of ncplus.pl

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar kubrey

parser movies epg ncplus